Typedoc: Please support @template alias for @typeparam

Created on 25 Sep 2018  路  5Comments  路  Source: TypeStrong/typedoc

First off, thank you so much for TypeDoc. I can imagine how bewildering TypeScript doc generation can be especially in the light of the recent advanced types. I really hope that this is a project that will get continual support.

VSCode supports @template to annotate TypeScript generic parameter. Not only it gets properly highlighted in the IDE, VSCode lets you also refactor the generic parameter name with their F2 command and both the name on the comment and the in-code references change.

Seeing that VSCode is Microsoft's and so is TypeScript, it would be good if TypeDoc would follow suit and support @template in addition to @typeparam, so that we can benefit both from VSCode's refactor capabilities and consistent document generation from TypeDoc.

enhancement help wanted

Most helpful comment

Support for @template will be included in 0.17.

All 5 comments

Thanks for reporting @soul-codes. This is a good idea, however I would like to wait for Microsoft to provide a little more direction before moving forward on this. 馃憤

While this issue remains open, what is the correct way to document generics?

For now, the @typeparam tag is the way to go as it is recognized by TypeDoc. TypeScript still uses @template, so we should probably support that as an alias. We should also probably support @typeParam for compatibility with Api-Extractor.

TSDoc has decided to officially support tag synonyms, so TypeDoc should also support them, PR welcome to add support for @template

Support for @template will be included in 0.17.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cfischer picture cfischer  路  4Comments

Bibliofile picture Bibliofile  路  3Comments

euberdeveloper picture euberdeveloper  路  3Comments

Rycochet picture Rycochet  路  4Comments

goodmind picture goodmind  路  3Comments