Tools and guide for documenting TypeScript code?

后端 未结 6 530
一向
一向 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:33

    I have just released a tool called TypeDoc that generates html api documentation pages out of TypeScript *.ts files.

    The documentation generator runs the TypeScript compiler and extracts the type information from the generated compiler symbols. Therefore you don't have to include any additional metadata within your comments.

    If you want to try it out, simply install and run the tool through npm:

    npm install typedoc --global
    typedoc --out path/to/documentation/ path/to/typescript/project/
    

    If you want to know what a documentation created with TypeDoc looks like, head over to the GitHub page of the project:

    http://typedoc.org/ | https://github.com/TypeStrong/typedoc

提交回复
热议问题