You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When defining a React JSX component as a Generic component, if you add a type default to the type parameter, the syntax highlighting marks it as an error, but no error is actually reported.
If you remove the fallback, or add an extends, the syntax error highlighting goes away.
The readme at my reproduction repo has screenshots of the bug in action, in case I've not explained the behaviour particularly well.
π Expected behavior
Syntax highlighting should be able to handle Generics with default types in JSX files.
Additional information about the issue
microsoft/TypeScript#45939 - Highly related, but is for typescript itself, rather than for VSCode's syntax highlighting.
π Search Terms
"vscode jsx generics"
π Version & Regression Information
β― Playground Link
https://github.com/james-yeoman/jsx-syntax-bug
π» Code
π Actual behavior
When defining a React JSX component as a Generic component, if you add a type default to the type parameter, the syntax highlighting marks it as an error, but no error is actually reported.
If you remove the fallback, or add an extends, the syntax error highlighting goes away.
The readme at my reproduction repo has screenshots of the bug in action, in case I've not explained the behaviour particularly well.
π Expected behavior
Syntax highlighting should be able to handle Generics with default types in JSX files.
Additional information about the issue
microsoft/TypeScript#45939 - Highly related, but is for typescript itself, rather than for VSCode's syntax highlighting.
My VSCode installation
About
contentThe text was updated successfully, but these errors were encountered: