typescript-docs
Generates comprehensive TypeScript documentation using JSDoc, TypeDoc, and multi-layered documentation patterns for different audiences. Use when creating API documentation, architectural decision records (ADRs), code examples, and framework-specific patterns for NestJS, Express, React, Angular, and
By giuseppe-trisciuoglio · 3,387 installs
npx skills add giuseppe-trisciuoglio/developer-kit --skill typescript-docs
Source repository · Upstream listing
TypeScript Documentation
Generate production ready TypeScript documentation with layered architecture for multiple audiences. Supports API docs with TypeDoc, ADRs, and framework specific patterns.
Overview
Use JSDoc annotations for inline documentation, TypeDoc for API reference generation, and ADRs for tracking design choices.
Key capabilities:
TypeDoc configuration and API documentation generation
JSDoc patterns for all TypeScript constructs
ADR creation and maintenance
Framework specific patterns (NestJS, React, Express, Angular, Vue)
ESLint validation rules for documentation quality
GitHub Actions pipeline setup
When to Use
Use this skill when creating API documentation, architectural decision records, code examples, or framework specific patterns for NestJS, Express, React, Angular, or Vue.
Quick Reference
Tool Purpose Command
TypeDoc API documentation generation npx typedoc
Compodoc Angular documentation npx compodoc p tsconfig.json
ESLint JSDoc Documentation validation eslint ext .ts src/
JSDoc Tags
Tag Use Case
@param Document parameters
@returns Document return values
@throws Document error conditions
@example Provide code examples
@remarks Add implementation notes
@see Cross reference related items
@deprecated Mark deprecated APIs
Instructions
1. Configure TypeDoc
2. Add JSDoc Comments
typescript
const authService = new AuthService(config);
const token = await authService.login(email, password);
3. Create an ADR
4. Set Up CI/CD Pipeline
5. Validate Documentation
If validation fails: review ESLint errors, fix JSDoc comments (add missing descriptions, add @param / @returns / @throws where absent), re run eslint ext .ts src/ until all errors pass before committing.
Examples
Documenting a React Hook
tsx
function UserList() {
const { data, isLoading, error } = usePaginatedData('/api/users', {
page: currentPage,
limit: 10
});
if (isLoading) return <Spinner / ;
if (error) return <ErrorMessage error={error} / ;
return <UserTable users={data.items} / ;
}
Documenting a Utility Function
typescript
isValidEmail('user@example.com'); // true
isValidEmail('invalid email'); // false
NestJS Controller Documentation
bash
curl H "Authorization: Bearer <token " https://api.example.com/users/123
Best Practices
1. Document Public APIs : All public methods, classes, and interfaces
2. Use @example : Provide runnable examples for complex functions
3. Include @throws : Document all possible errors
4. Add @see : Cross reference related functions/types
5. Use @remarks : Add implementation details and notes
6. Document Generics : Explain generic constraints and usage
7. Include Performance Notes : Document time/space complexity
8. Add Security Warnings : Highlight security considerations
9. Keep Updated : Update docs when code changes
10. Don't document obvious code : Focus on why, not what
Constraints and Warnings
Private Members : Use @private or exclude from TypeDoc output
Complex Types : Document generic constraints and type parameters
Breaking Changes : Use @deprecated with migration guidance
Security Info : Never include secrets or credentials in documentation
Link Validity : Ensure @see references point to valid locations
Example Code : All examples should be runnable and tested
Versioning : Keep documentation in sync with code versions
References
[references/jsdoc patterns.md](references/jsdoc patterns.md) — JSDoc patterns for interfaces, functions, classes, generics, and unions
[references/framework patterns.md](references/framework patterns.md) — Framework specific patterns for NestJS, React, Express, and Angular
[references/adr patterns.md](references/adr patterns.md) — ADR templates and examples
[references/pipeline setup.md](references/pipeline setup.md) — CI/CD pipeline configuration for documentation
[references/validation.md](references/validation.md) — ESLint rules and validation checklists
[references/typedoc configuration.md](references/typedoc configuration.md) — Complete TypeDoc configuration options
[references/examples.md](references/examples.md) — Additional code examples