Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEmpty JSDocTemplateTag has single type parameter with zero width #36692
Comments
This is a pretty normal parse when we encounter syntax where an identifier is mandatory. You'd see the same for e.g.
the second |
@RyanCavanaugh I don't believe that's an equivalent example because this is an array. Nowhere else in the AST does this to my knowledge. This would be like: export { }; Parsing as:
Instead of: // (this is what it does and is correct)
NamedExports {
elements: []
} |
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow. |
A better example is class C<> {
} Which does produce an empty array for typeParameters. |
I want to fix it, Can I take this? |
Give it a shot! |
@Rustin-Liu are you still working on this? If not, I'd like to take a shot a this. |
Please feel free take it. |
@Ivan-Z are you still working on this? If not, I'm gonna give it a shot. |
TypeScript Version: 3.8.0-dev.20200208
Search Terms: JSDocTemplateTag typeParameters
Code
Expected behavior: Empty array.
Actual behavior: Array with single element:
[{pos: 16, end: 16, …}]
https://ts-ast-viewer.com/#code/PQKhCgAIUgBAXApgWwA4BsCGSomOdReSADwG4g (select
typescript@next
and checkshow internals
)