TSDoc defines a common format for TypeScript documentation comments so multiple tools parse the same tags consistently. The @microsoft/tsdoc package provides a reference parser implementation.
Overview
TSDoc is a proposal to standardize documentation comments in TypeScript so different tools can extract content without conflicting markup. The notation extends familiar JSDoc-style blocks with tags such as param, remarks, returns, and custom tool-specific tags.
A single file may be consumed by API doc generators, build pipelines, linters, and editors. Without a shared grammar, each tool interprets tags and Markdown-like constructs differently, which can skew published docs or build output. TSDoc aims for extensibility for custom tags, interoperability so one tool's tags do not break others, and syntax that stays close to JSDoc and Markdown.
The monorepo ships @microsoft/tsdoc as an open source parser libraries can embed for spec compliance. A TSDoc Playground offers an interactive demo of parsing behavior. Related packages in the ecosystem include ESLint rules for TSDoc comments.
Key features
- Documented TSDoc comment grammar
- Reference parser package
- Extensible custom tag patterns
- JSDoc-familiar tag syntax
- Interactive parsing playground
- Tag reference documentation
- Interop across doc and lint tools
Use cases
- Parsing TypeScript doc comments in tools
- Aligning API doc generators on one syntax
- Linting documentation tags in CI
- Editor syntax highlighting for doc blocks