DEV Community

Discussion on: 💻 Documentation as code

adamcoster profile image
Adam Coster Author

JSDoc is great, and gets at a subset of the general problem.

JSDoc doesn't cover all the functionality that Typescript does for type information, and is quite verbose in comparison. Using both allows Typescript to handle types and JSDoc to handle non-code metadata (explanations, samples), which can all be pulled together with TypeDoc and similar tools.

Thread Thread
stereoplegic profile image
Mike Bybee

True. You have to write fewer types just for the sake of other types.

Thread Thread
berkmann18 profile image
Maximilian Berkmann

JSDoc is nice until you want to generate the documentation where you then feel like you're using an unmaintained tool; documentation.js is a good alternative although TS removes the need for verbosity and the other pros it gives.