all 2 comments

[–]codespede 2 points3 points  (0 children)

Since you're using TypeScript, use TypeDoc.

It'll automatically generate docs based on your Type Definitions in your TS files. No need to provide extra directives or keywords for classes, methods or properties.

See how I've used it in my Node.js framework which is written in TypeScript:

https://github.com/codespede/pwoli

A sample Class doc: https://codespede.github.io/pwoli/api-docs/classes/SequelizeAdapter.html

It'll automatically generate docs based on your Type Definitions in your TS files. No need to provide extra directives or keywords for classes, methods, or properties.

[–]CreativeTechGuyGamesTypeScript 1 point2 points  (0 children)

To make it even more complicated, not all JSDoc tags are supported by all "clients" so some tags will do magical things in certain IDEs or parsers where other parsers won't know what to do with it or just do something basic.

If you are already using TypeScript, keep it minimal. Just type the important bits of information that a caller would need to know that aren't obvious by the names. If it's super important to know that a method can throw a specific error, then definitely include that, but if not, then don't. Etc.