-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
TS may parse type parameter lists as JSX #26179
Comments
Its known : https://basarat.gitbooks.io/typescript/content/docs/jsx/react.html#generic-functions I'm a user just like you just wanted to state that users have known this in the past 🌹 |
@basarat Thank you very much for your reply and solved my doubts. If the official can improve this problem, then I feel would be useful. |
I think we should be able to use lookahead to detect that we definitely have a type parameter list. |
We already do some lookahead to look for a comma after the |
TS may mistakenly use generics as jsx,but it's ok on vscode.
TypeScript Version: 3.0.1
Search Terms:
jsx generics, class generics
Code
Expected behavior:
Actual behavior:
Playground Link:
compile errror:
https://agentcooper.github.io/typescript-play/?jsx=1#code/MYewdgzgLgBAhjAvDAPAFSfMBPAfACgEoAuGAQQCcK5t1cl6BvAWACgYOYKBTKAVwpgA3GwC+QA
but code on this is OK
The text was updated successfully, but these errors were encountered: