Tag Kind: Block
TSDoc Reference: @typeParam
The @typeParam
tag is used to document a type parameter of a function, method, class, interface or type alias.
TypeDoc recognizes the @template
tag as an alias of @typeParam
.
/**
* @typeParam T - the identity type
*/
export function identity<T>(x: T): T {
return x;
}
The TSDoc standard requires that the @typeParam
tag not include types and
that the parameter name must be followed by a hyphen to separate it from the
description. For improved compatibility with projects using TypeScript type
annotations in JavaScript files, TypeDoc does not enforce these requirements.
The following @typeParam
tags will all be passed in the same way by TypeDoc.
/**
* @typeParam test - description
* @typeParam test description
* @typeParam {string} test - description
* @typeParam {string} test description
*/
@template
tag