We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
react typescript generic anonymous function
Latest version
https://www.typescriptlang.org/play?#code/G4QwTgBAFgpgNnA9hAvBAPAFQHwAoQBcEmAlKthAC5gCuMQA
var hello = <T>(a: T) => true
Seems like typescript thinks that generic is JSX tag
Typescript would realize that this is a generic and not JSX tag
The text was updated successfully, but these errors were encountered:
If you add extends does work var hello = <T extends any>(a: T) => true
var hello = <T extends any>(a: T) => true
Sorry, something went wrong.
Duplicate of #15713.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
π Search Terms
react typescript generic anonymous function
π Version & Regression Information
Latest version
β― Playground Link
https://www.typescriptlang.org/play?#code/G4QwTgBAFgpgNnA9hAvBAPAFQHwAoQBcEmAlKthAC5gCuMQA
π» Code
π Actual behavior
Seems like typescript thinks that generic is JSX tag
π Expected behavior
Typescript would realize that this is a generic and not JSX tag
The text was updated successfully, but these errors were encountered: