Tools and guide for documenting TypeScript code?

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

    Generate XML Doc comments one of the proposed issues for TypeScript language.

    For now TypeScript tools support JSDoc Announcing TypeScript 0.8.2.

    So, you definitely want to use JSDoc style for comments. If you need comments only for IntelliSense - using JSDoc will cover your requirement. If you need comments because you want to provide documentation for your API consumers - you should use declaration files (*.d.ts) with comments. If you want to generate nice documentation on web - I guess it will be easy to just wait when TypeScript team will implement generation of XML doc comments (or write it by hand).

提交回复
热议问题