Suggestion: Add support for jsdoc-based templates with constrains #24283
Labels
Domain: JSDoc
Relates to JSDoc parsing and type generation
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
Milestone
Search Terms
jsdoc template
Suggestion
This feature request is based on issue #1178.
#1178 led to the implementation of
@template
and was closed afterwards.The current implementation does not allow to add constrains for a generic:
The latest statement from google in 2015 was that they might add it also to the closure-compiler some day:
Use Cases
For
//ts-check
projects it would be possible to use the full power of generics.Examples
Checklist
My suggestion meets these guidelines:
Stackoverflow: Is it possible to constrain a generic type defined in a jsDoc @template declaration? (May 2017)
The text was updated successfully, but these errors were encountered: