Overview
Thetsdoc.json file configures TSDoc parser behavior and custom tag definitions. This file is separate from mint-tsdocs.config.json and is created automatically by mint-tsdocs init at your project root.
Location: Project root (next to package.json)
Purpose:
- Define custom TSDoc tags for your documentation
- Extend base TSDoc configuration
- Control which tags are supported in your project
Auto-Generated Configuration
When you runmint-tsdocs init, a tsdoc.json file is created with the following default configuration:
Core Fields
$schema
Type:string
Default: "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json"
JSON Schema URL for IDE autocomplete and validation support.
extends
Type:string[]
List of TSDoc configuration files to extend. Allows you to inherit tag definitions from other configurations.
@microsoft/api-extractor/extends/tsdoc-base.json- Base TSDoc tags (recommended)- Custom tsdoc.json files in your project or packages
@microsoft/api-extractor/extends/tsdoc-base.json to get standard TSDoc tags like @param, @returns, @remarks, etc.
tagDefinitions
Type:array
Custom TSDoc tag definitions for project-specific documentation tags.
Tag Definition Properties
tagName (required)- Type:
string - The tag name including the
@symbol - Example:
"@default","@experimental","@deprecated"
- Type:
"block" | "modifier" | "inline" - Tag type:
block- Block-level tag with content (e.g.,@default,@example)modifier- Simple flag tag (e.g.,@experimental,@sealed)inline- Inline tag within text (e.g.,{@link},{@inheritDoc})
- Type:
boolean - Default:
true - Whether the tag can appear multiple times in the same comment
supportForTags
Type:object
Explicitly enable or disable support for specific tags. Tags listed here will be recognized by the TSDoc parser.
tagDefinitions should also be enabled in supportForTags.
Standard TSDoc Tags
When you extend@microsoft/api-extractor/extends/tsdoc-base.json, you get these standard tags:
Block Tags
@deprecated- Mark as deprecated@example- Usage example@param- Parameter description@returns- Return value description@remarks- Additional remarks@see- Cross-reference@throws- Exception description@typeParam- Generic type parameter
Modifier Tags
@public- Public API@beta- Beta API (may change)@alpha- Alpha API (experimental)@internal- Internal API (not published)@sealed- Class cannot be extended@virtual- Method can be overridden@override- Method overrides parent
Inline Tags
{@link}- Link to another symbol{@inheritDoc}- Inherit documentation from parent{@label}- Define a label for linking
Common Customizations
Adding a @default Tag
The default configuration includes a@default tag for documenting default values:
Adding an @experimental Tag
Add an experimental tag to mark unstable APIs:Adding a @category Tag
Organize APIs by category:Validation
mint-tsdocs init validates your tsdoc.json and ensures:
- Base extension: Must extend
@microsoft/api-extractor/extends/tsdoc-base.json - Schema reference: Should include
$schemafor IDE support - Tag consistency: Tags in
tagDefinitionsshould be enabled insupportForTags
Advanced Configuration
Multiple Extends
Extend multiple configurations to combine tag sets:Custom Inline Tags
Create custom inline tags for special formatting:Complete Example
See Also
- Configuration Reference - Main mint-tsdocs configuration
- TSDoc Specification - Official TSDoc documentation
- API Extractor TSDoc Config - TSDoc configuration guide
- Cheat Sheet - Quick reference for common tags

