coverage command helps you track the completeness of your API documentation. This guide explains how coverage is calculated and how to interpret the results.
How Coverage Works
mint-tsdocs uses API Extractor to analyze your project’s exported API surface. This ensures that we only count items that are actually part of your public API, ignoring internal implementation details.What is Counted?
The coverage calculation includes the following API items if they are exported from your entry point:- Classes
- Interfaces
- Functions
- Enums
- Type Aliases
- Variables (const/let)
- Namespaces
What is Considered “Documented”?
An API item is considered documented if it has a TSDoc comment block associated with it.Internal Items
By default, items marked with the@internal release tag are excluded from coverage calculations. This allows you to have public-facing types that are not meant for consumers without negatively impacting your coverage score.
includeInternal: true in your configuration or using the --include-internal flag (if supported).
Configuration
You can configure coverage settings inmint-tsdocs.config.json:
Filtering
You can filter which files are included in the coverage calculation using glob patterns.- Include: Only items defined in files matching these patterns are counted.
- Exclude: Items defined in files matching these patterns are ignored.
Grouping
The coverage report can be grouped to help you identify areas that need attention.- None: Shows a single total percentage.
- File: Breaks down coverage by source file.
- Folder: Breaks down coverage by source folder.
CI/CD Integration
Thecoverage command exits with code 1 if the coverage percentage is below the configured threshold (default 80%). This makes it easy to integrate into your CI/CD pipeline to prevent regressions in documentation quality.

