Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please support @template alias for @typeparam #860

Closed
soul-codes opened this issue Sep 25, 2018 · 5 comments · Fixed by dbartholomae/redux-dynamic-modules-beacon#25 or gpicron/ssb-subjective-group#1
Labels
enhancement Improved functionality help wanted Contributions are especially encouraged
Milestone

Comments

@soul-codes
Copy link

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.

@aciccarello
Copy link
Collaborator

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. 👍

@KOVIKO
Copy link

KOVIKO commented Oct 24, 2019

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

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Oct 26, 2019

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.

@Gerrit0 Gerrit0 added the help wanted Contributions are especially encouraged label Jan 3, 2020
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Jan 3, 2020

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

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 15, 2020

Support for @template will be included in 0.17.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improved functionality help wanted Contributions are especially encouraged
Projects
None yet
4 participants