Comprehensive TypeScript guidance covering compiler configuration, advanced types, utility types, type guards, strict mode workflows, and documentation patterns; use when configuring tsconfig, designing complex generics, making illegal states unrepresentable, fixing type errors, or writing testable and maintainable type-safe APIs.
Overall
score
99%
Does it follow best practices?
Validation for skill structure
TypeDoc generates API documentation from TypeScript source code and JSDoc comments. It produces clean, searchable HTML or Markdown documentation.
npm install --save-dev typedoc
# Optional plugins
npm install --save-dev typedoc-plugin-markdown
npm install --save-dev typedoc-plugin-missing-exportsCreate typedoc.json in your project root:
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["src/index.ts"],
"out": "docs/api",
"excludePrivate": true,
"excludeProtected": false,
"excludeInternal": true,
"readme": "README.md",
"plugin": []
}Single entry point:
{
"entryPoints": ["src/index.ts"]
}Multiple entry points:
{
"entryPoints": [
"src/index.ts",
"src/auth/index.ts",
"src/database/index.ts"
]
}Glob patterns:
{
"entryPointStrategy": "expand",
"entryPoints": ["src/**/*.ts"]
}{
"out": "docs/api",
"theme": "default",
"name": "My Project API",
"includeVersion": true,
"disableSources": false,
"sourceLinkTemplate": "https://github.com/user/repo/blob/{gitRevision}/{path}#L{line}"
}{
"excludePrivate": true, // Exclude private members
"excludeProtected": false, // Include protected members
"excludeInternal": true, // Exclude @internal tagged items
"excludeExternals": true, // Exclude external modules
"excludeNotDocumented": false // Include items without docs
}{
"categorizeByGroup": true, // Group by @group tags
"defaultCategory": "Other", // Default category name
"categoryOrder": [ // Category display order
"Core",
"Authentication",
"Database",
"*"
]
}Organize documentation with JSDoc tags:
/**
* @group Authentication
*/
export class AuthService { }
/**
* @group Database
*/
export class UserRepository { }
/**
* @category Utilities
*/
export function formatDate(date: Date): string { }For Markdown output (useful for static site generators):
{
"plugin": ["typedoc-plugin-markdown"],
"out": "docs/api",
"theme": "markdown",
"entryDocument": "index.md",
"hideInPageTOC": false
}{
"scripts": {
"docs": "typedoc",
"docs:watch": "typedoc --watch",
"docs:serve": "typedoc && npx http-server docs/api"
}
}{
"theme": "./custom-theme",
"customCss": "./docs/custom.css"
}{
"navigation": {
"includeCategories": true,
"includeGroups": true,
"includeFolders": false
},
"navigationLinks": {
"GitHub": "https://github.com/user/repo",
"NPM": "https://www.npmjs.com/package/my-package"
}
}{
"searchInComments": true,
"searchInDocuments": true,
"searchGroupBoosts": {
"Core": 2.0,
"Authentication": 1.5
}
}For monorepo setups with multiple packages:
{
"entryPoints": [
"packages/core/src/index.ts",
"packages/auth/src/index.ts",
"packages/database/src/index.ts"
],
"entryPointStrategy": "packages"
}{
"validation": {
"notExported": true, // Warn about non-exported types
"invalidLink": true, // Warn about invalid @link references
"notDocumented": false // Warn about undocumented items
},
"requiredToBeDocumented": [
"Class",
"Function",
"Method"
]
}name: Generate Docs
on:
push:
branches: [main]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci
- run: npm run docs
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/apipages:
stage: deploy
script:
- npm ci
- npm run docs
- mv docs/api public
artifacts:
paths:
- public
only:
- mainFor large codebases:
{
"excludeNotDocumented": true,
"excludePrivate": true,
"excludeInternal": true,
"cacheBust": true,
"cleanOutputDir": true
}{
"$schema": "https://typedoc.org/schema.json",
"name": "My Project API Documentation",
"entryPoints": ["src/index.ts"],
"entryPointStrategy": "resolve",
"out": "docs/api",
"theme": "default",
"readme": "README.md",
"includeVersion": true,
"excludePrivate": true,
"excludeProtected": false,
"excludeInternal": true,
"excludeNotDocumented": false,
"categorizeByGroup": true,
"defaultCategory": "Other",
"categoryOrder": [
"Core",
"Authentication",
"Database",
"*"
],
"searchInComments": true,
"validation": {
"notExported": true,
"invalidLink": true,
"notDocumented": false
},
"navigation": {
"includeCategories": true,
"includeGroups": true
},
"navigationLinks": {
"GitHub": "https://github.com/user/repo",
"NPM": "https://www.npmjs.com/package/my-package"
},
"plugin": ["typedoc-plugin-missing-exports"],
"sourceLinkTemplate": "https://github.com/user/repo/blob/{gitRevision}/{path}#L{line}"
}Issue: Types not appearing
excludePrivate, excludeInternal settings--logLevel Verbose for debuggingIssue: Slow generation
excludeNotDocumented--skipErrorChecking for quicker buildsIssue: Broken links
validation.invalidLink@link instead of markdown links for type referencesInstall with Tessl CLI
npx tessl i pantheon-ai/typescript-advancedreferences