TSDoc Support

The TSDoc standard is a proposal to standardize parsing of JSDoc-like comments. TypeDoc aims to be compliant with the TSDoc standard, but does not enforce it. This means that while TypeDoc should be able to parse all (or nearly all) TSDoc-complaint comments, it does not require that your comments follow the standard.

This approach has several benefits, including better support for projects originally written using JSDoc and support for more markdown constructs (including day-to-day features like headings, and lists). However, for projects requiring stricter validation of comment formats, this laxness may not be acceptable. In this case, api-extractor is recommended instead of TypeDoc for it's much stricter conformance to TSDoc.

  • The jsDocCompatibility option can be used to configure TypeDoc to parse comments more similarly to JSDoc/TypeScript than TSDoc.
  • TypeDoc takes advantage that TSDoc syntax is (with the exception of tags) a subset of markdown, so delegates most comment parsing to its markdown parser.
  • The @inheritDoc tag is declared as an inline tag by TSDoc, but TypeDoc recognizes it in block tag form as well for compatibility with JSDoc.
  • The @label tag has been extended to support user specified meanings in declaration references.
  • The @link tag may be parsed with either TSDoc's declaration references or with TypeScript's resolution.
  • The @param tag supports ignoring type annotations in order to support TypeScript's types-in-comments capability.
  • The @privateRemarks tag may be configured to be included in the documentation.
  • The @public tag is not inherited by contained members.
  • The @typeParam tag supports ignoring type annotations in order to support TypeScript's types-in-comments capability.