require-type-param-tag-description
Require each @typeParam / @template tag to include a human-readable description.
Targeted pattern scopeโ
This rule checks generic TypeDoc comments on classes, interfaces, functions, methods, and type aliases.
What this rule reportsโ
This rule reports generic tags that include a type parameter name but no explanatory description.
Why this rule existsโ
Generic APIs are difficult to use without clear type-parameter intent. This rule ensures every generic tag carries useful semantics.
โ Incorrectโ
/**
* Identity helper.
* @typeParam TValue
* @param value Input value.
* @returns Same value.
*/
export function identity<TValue>(value: TValue): TValue {
return value;
}
โ Correctโ
/**
* Identity helper.
* @typeParam TValue Value type.
* @param value Input value.
* @returns Same value.
*/
export function identity<TValue>(value: TValue): TValue {
return value;
}
Behavior and migration notesโ
The rule reports missing generic prose without autofix, because meaningful descriptions are project-specific.
ESLint flat config exampleโ
import typedocPlugin from "eslint-plugin-typedoc";
export default [
{
plugins: { typedoc: typedocPlugin },
rules: {
"typedoc/require-type-param-tag-description": "error",
},
},
];
When not to use itโ
Disable if your team intentionally documents generic semantics elsewhere.
Package documentationโ
TypeDoc package documentation:
Further readingโ
Rule catalog ID: R019
Adoption resourcesโ
- Pair with
require-type-param-tagsandno-extra-type-param-tagsfor robust generic documentation.