better-docs icon indicating copy to clipboard operation
better-docs copied to clipboard

How to document generic type parameters?

Open cowwoc opened this issue 4 years ago • 1 comments

Given:

interface Collection<T>
{}

How can one document type parameter T?

cowwoc avatar Dec 11 '20 15:12 cowwoc

https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html states Declaring generic classes or types is unsupported.

I propose using the Javadoc syntax @param <T> description.

cowwoc avatar Dec 11 '20 15:12 cowwoc