Tools and guide for documenting TypeScript code?

后端 未结 6 465
一向
一向 2021-01-30 20:00

Are there any tools for generating documentation for TypeScript source code? Or should I use something generic like NaturalDocs? What would be the recommended style of the block

6条回答
  •  一生所求
    2021-01-30 20:47

    I've written a tool for generating HTML documentation from declaration (.d.ts) files here. It has basic support for JSDoc-style comments.

    Compile your TypeScript source files with the -d -c options to generate declaration files and preserve comments. Then after installation, you can run

    typescript-docs *.d.ts

    to generate HTML documentation on standard output.

    To save output to a file, use

    typescript-docs *.d.ts --output=path/to/output.html

提交回复
热议问题