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.
Expected a semicolon
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
Describe the bug
Generic types interpreted as TSX (I think?)
Removing the preceding <P extends object> fixes it.
<P extends object>
dprint-plugin-typescript version: 0.51.0
Input Code
const x = <P extends object>(a: React.ComponentType<P>): React.ComponentType<P & { a: string }> => React.memo();
Expected Output
Actual Output
Line 1, column 95: Expected a semicolon pe<P & { a: string }> => React. ~
Playground link: https://dprint.dev/playground/#code/MYewdgzgLgBAHjAvDAPABRgUzlTYAmEMIARgFabBQB8AFAIYBcMASpvVQHQDCIAtgAdweKABUAngMzpqASmZsOUHvyFgREqehgAyGAG8YTGNABOASzABzGAF9qSB4q59MfELVkBuIA/language/typescript
The text was updated successfully, but these errors were encountered:
Opened swc-project/swc#2161
Sorry, something went wrong.
a fix for this just landed in swv via swc-project/swc#2166 \o/
3650711
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Generic types interpreted as TSX (I think?)
Removing the preceding
<P extends object>
fixes it.dprint-plugin-typescript version: 0.51.0
Input Code
Expected Output
Actual Output
Playground link: https://dprint.dev/playground/#code/MYewdgzgLgBAHjAvDAPABRgUzlTYAmEMIARgFabBQB8AFAIYBcMASpvVQHQDCIAtgAdweKABUAngMzpqASmZsOUHvyFgREqehgAyGAG8YTGNABOASzABzGAF9qSB4q59MfELVkBuIA/language/typescript
The text was updated successfully, but these errors were encountered: