Most users won’t need this. Run
npx mint-tsdocs and you’re done. This guide is for special cases and understanding what happens under the hood.TypeScript Configuration
Yourtsconfig.json must generate declaration files:
tsconfig.json
declaration: true, API Extractor has nothing to extract.
API Extractor Configuration
When you runmint-tsdocs generate, it creates docs/.tsdocs/api-extractor.json automatically. For manual setup:
.tsdocs/api-extractor.json
mainEntryPointFilePath- Your main .d.ts filedocModel.enabled: true- Required for generating .api.json- Tokens like
<projectFolder>are replaced automatically
Mintlify Configuration
If you don’t have Mintlify set up:docs/docs.json should exist. mint-tsdocs will add navigation automatically.
Gitignore
Add to.gitignore:
.gitignore
Package.json Scripts
Add convenience scripts:package.json
Monorepo Setup
For workspaces with multiple packages:Option 1: Per-Package Docs
Option 2: Centralized Docs
Create a single docs folder at the root:packages/core/mint-tsdocs.config.json
packages/utils/mint-tsdocs.config.json
Verification
Check your setup is working:1
Build TypeScript
2
Run API Extractor
3
Generate Docs
4
Check Navigation
Troubleshooting
No .d.ts files generated
Problem: TypeScript build succeeds but no declaration files. Solution: Add"declaration": true to tsconfig.json compilerOptions.
API Extractor can’t find entry point
Problem: Error like “Unable to load file: dist/index.d.ts” Solutions:- Verify TypeScript build succeeded:
ls dist/index.d.ts - Check
entryPointin config matches your outDir - Ensure path is relative to project root
No .api.json generated
Problem: API Extractor runs but no .api.json file appears. Solutions:- Check
docModel.enabled: truein api-extractor.json - Verify output path in
apiJsonFilePath - Look for errors in API Extractor output
No MDX files generated
Problem: Command succeeds but docs folder is empty. Solutions:- Verify .api.json exists in
docs/.tsdocs/ - Check
outputFolderpath in config - Run with
--verboseto see what’s happening - Ensure your entry point exports something public
docs.json not updated
Problem: MDX files generated but navigation unchanged. Solutions:- Verify
docsJsonpath is correct - Check docs.json is valid JSON (no syntax errors)
- Ensure file has write permissions
- Look for errors in verbose output
TypeScript errors in generated docs
Problem: Mintlify shows type errors when rendering components. Solutions:- Check your TypeScript is properly compiled
- Verify complex types are exported (not internal)
- Use
@publicJSDoc tag for intended public API - Check for circular dependencies
Advanced Configuration
See Configuration Reference for all available options:- Custom templates
- TSDoc tag definitions
- API Extractor message levels
- Bundled packages
- Project folder URLs

