
Jsdoc Tsdoc
- 42 installs
- 27 repo stars
- Updated July 17, 2026
- claude-dev-suite/claude-dev-suite
Apply JSDoc and TSDoc standards for documenting TypeScript, covering tags like @param/@returns and tools like TypeDoc and API Extractor.
About
Covers JSDoc and TSDoc documentation standards including syntax, tags, and TypeScript integration. A developer uses it when documenting TypeScript APIs and generating docs with TypeDoc or API Extractor.
- TSDoc tags: @param, @returns, and TypeScript integration
- Doc generation with TypeDoc and API Extractor
Jsdoc Tsdoc by the numbers
- 42 all-time installs (skills.sh)
- Ranked #856 of 1,879 Documentation skills by installs in the Skillselion catalog
- Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/claude-dev-suite/claude-dev-suite --skill jsdoc-tsdocAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 42 |
|---|---|
| repo stars | ★ 27 |
| Last updated | July 17, 2026 |
| Repository | claude-dev-suite/claude-dev-suite ↗ |
What it does
Apply JSDoc and TSDoc standards for documenting TypeScript, covering tags like @param/@returns and tools like TypeDoc and API Extractor.
Files
JSDoc & TSDoc Documentation
Full Reference: See advanced.md for JSDoc type annotations in JavaScript, TypeDoc/API Extractor configuration, ESLint plugin setup, and README templates.
Deep Knowledge: Usemcp__documentation__fetch_docswith technology:jsdocfor comprehensive tag reference.
When NOT to Use This Skill
- Plain JavaScript projects - Use the
jsdocskill for JavaScript-specific JSDoc patterns - Code comments (non-API) - TSDoc is for public API documentation, not inline code comments
- Auto-generated docs from code - Use TypeDoc or API Extractor tools directly
TSDoc vs JSDoc
| Feature | JSDoc | TSDoc |
|---|---|---|
| Purpose | JS documentation + types | TS documentation only |
| Type annotations | @type, @param {Type} | Not needed (use TS types) |
| Standardization | De facto | Formal standard |
Use TSDoc for TypeScript projects - types come from TypeScript, comments describe behavior.
Function Documentation
/**
* Calculates the total price including tax.
*
* @remarks
* This method uses the default tax rate unless overridden.
* For international orders, use {@link calculateInternationalPrice} instead.
*
* @param basePrice - The pre-tax price in cents
* @param taxRate - Tax rate as decimal (default: 0.1 for 10%)
* @returns The total price including tax in cents
*
* @throws {@link InvalidPriceError}
* Thrown if basePrice is negative
*
* @example
* ```typescript
* const total = calculateTotalPrice(1000, 0.08);
* console.log(total); // 1080
* ```
*
* @beta
*/
function calculateTotalPrice(basePrice: number, taxRate = 0.1): number {
if (basePrice < 0) {
throw new InvalidPriceError('Price cannot be negative');
}
return Math.round(basePrice * (1 + taxRate));
}Interface Documentation
/**
* Configuration options for the HTTP client.
*
* @remarks
* All timeouts are in milliseconds.
*
* @public
*/
interface HttpClientOptions {
/**
* Base URL for all requests.
* @example 'https://api.example.com/v1'
*/
baseUrl: string;
/**
* Request timeout in milliseconds.
* @defaultValue 30000
*/
timeout?: number;
/**
* Maximum number of retry attempts for failed requests.
* @defaultValue 3
*/
maxRetries?: number;
}All TSDoc Tags
Block Tags
| Tag | Usage |
|---|---|
@param name - description | Parameter documentation |
@returns description | Return value description |
@throws {Type} description | Thrown exceptions |
@example | Usage examples (code block) |
@remarks | Extended description |
@see | Related references |
@deprecated reason | Mark as deprecated |
@defaultValue value | Default value |
@typeParam T - description | Generic type parameter |
Modifier Tags
| Tag | Meaning |
|---|---|
@public | Part of public API |
@internal | Internal implementation |
@alpha | Early preview, may change |
@beta | Maturing, API may change |
@readonly | Read-only property |
@override | Overrides parent |
Inline Tags
| Tag | Usage |
|---|---|
{@link Target} | Link to symbol |
| `{@link Target \ | text}` |
{@inheritDoc Parent.method} | Inherit documentation |
Anti-Patterns
| Anti-Pattern | Why It's Wrong | Correct Approach |
|---|---|---|
| Documenting types in TypeScript | Redundant, types already in signature | Describe behavior, not types |
| Copy-pasting function signature | Adds no value, desynchronizes | Explain purpose, edge cases, examples |
Missing @example for complex APIs | Users don't know how to use it | Always include usage examples |
Using @deprecated without migration | Users don't know what to use instead | @deprecated Use {@link newFunction} instead |
No @throws documentation | Users don't know what to catch | Document all thrown exceptions |
Quick Troubleshooting
| Issue | Diagnosis | Solution |
|---|---|---|
| VS Code not showing docs on hover | Malformed JSDoc comment | Ensure /** start and proper tag syntax |
eslint-plugin-tsdoc errors | Invalid TSDoc syntax | Fix tag formatting per TSDoc spec |
| TypeDoc ignoring comments | Wrong comment location | Place JSDoc directly above declaration |
{@link} not resolving | Incorrect symbol reference | Use fully qualified name or import path |
Official References
| Resource | URL |
|---|---|
| TSDoc | https://tsdoc.org/ |
| JSDoc | https://jsdoc.app/ |
| TypeDoc | https://typedoc.org/ |
| API Extractor | https://api-extractor.com/ |
JSDoc & TSDoc Advanced Patterns
JSDoc for JavaScript - Type Annotations
Typedef and Complex Types
/**
* @typedef {Object} User
* @property {string} id - Unique identifier
* @property {string} name - Display name
* @property {string} [email] - Optional email
* @property {boolean} active - Account status
*/
/**
* Creates a new user.
*
* @param {string} name - User's name
* @param {Object} [options] - Optional settings
* @param {string} [options.email] - User's email
* @param {boolean} [options.active=true] - Initial status
* @returns {User} The created user
*/
function createUser(name, options = {}) {
return {
id: crypto.randomUUID(),
name,
email: options.email,
active: options.active ?? true,
};
}
/**
* @template T
* @param {T[]} items - Array of items
* @param {(item: T) => boolean} predicate - Filter function
* @returns {T | undefined} First matching item
*/
function find(items, predicate) {
return items.find(predicate);
}Import Types in JSDoc
/**
* @typedef {import('./types').User} User
* @typedef {import('express').Request} Request
*/
/**
* @param {Request} req
* @param {User} user
*/
function handleRequest(req, user) {
// ...
}Documentation Generation
TypeDoc Configuration
npm install --save-dev typedoc// typedoc.json
{
"entryPoints": ["src/index.ts"],
"out": "docs",
"plugin": ["typedoc-plugin-markdown"],
"excludePrivate": true,
"excludeInternal": true,
"readme": "README.md",
"name": "My Library API",
"includeVersion": true
}npx typedocAPI Extractor
npm install --save-dev @microsoft/api-extractor// api-extractor.json
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>/api"
},
"docModel": {
"enabled": true
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/index.d.ts"
}
}ESLint Plugin for TSDoc
npm install --save-dev eslint-plugin-tsdoc// eslint.config.mjs
import tsdocPlugin from 'eslint-plugin-tsdoc';
export default [
{
plugins: {
tsdoc: tsdocPlugin,
},
rules: {
'tsdoc/syntax': 'warn',
},
},
];Best Practices Examples
Do's - Complete Function Documentation
/**
* Searches for users matching the given criteria.
*
* @remarks
* Results are paginated with a default of 20 items per page.
* Use the `page` and `limit` parameters for custom pagination.
*
* @param query - Search query (matches name, email)
* @param options - Search options
* @returns Paginated list of matching users
*
* @example
* // Search by name
* const results = await searchUsers('john');
*
* @example
* // With pagination
* const results = await searchUsers('john', { page: 2, limit: 50 });
*/
async function searchUsers(
query: string,
options?: SearchOptions
): Promise<PaginatedResponse<User>> {
// ...
}Don'ts - Common Mistakes
// DON'T: Redundant type information
/**
* @param name {string} - The name // Type already in TS
* @returns {number} A number // Type already in TS
*/
function greet(name: string): number { }
// DON'T: Obvious documentation
/**
* Gets the user. // Adds no value
* @returns The user // Adds no value
*/
function getUser(): User { }
// DON'T: Outdated documentation
/**
* @param userId - The user ID // Wrong! Parameter was renamed
*/
function getUser(id: string): User { }README Template
# Package Name
Brief description of what this package does.
## Installation
\`\`\`bash
npm install package-name
\`\`\`
## Quick Start
\`\`\`typescript
import { MainClass } from 'package-name';
const instance = new MainClass({ option: 'value' });
const result = await instance.doSomething();
\`\`\`
## API Reference
See [API Documentation](./docs/README.md).
## License
MITComplete Checklist
Public API
- [ ] All exports documented
- [ ] Examples for main functions
- [ ] @remarks for complex logic
- [ ] @throws for exceptions
- [ ] @deprecated with migration path
- [ ] @see for related APIs
Internal Code
- [ ] @internal tag used
- [ ] Complex algorithms explained
- [ ] Edge cases documented
- [ ] TODO comments tracked
CI/CD
- [ ] eslint-plugin-tsdoc enabled
- [ ] TypeDoc or API Extractor in build
- [ ] API report checked for breaking changes
Related skills
Documentationdocs