-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
TSX Loader fails to parse Generics for Arrow Functions #265
Comments
The I'm also not going to try to turn esbuild into a "better TypeScript" because it wouldn't do any good. The point of TypeScript is the types, and with esbuild you still have to run the official TypeScript compiler to do type checking. So even if esbuild could parse this syntax when TypeScript can't, that means you'd no longer be able to type check your source code. |
Understood, thank you anyway 👍🏼 |
Hi 🙈
I've found this bug/weird (not really) behaviour: when generics are being used with arrow functions while using the
tsx
loader, ESBuild will throw an error.Reproducible with:
This seems to be a known issue with TypeScript as well (microsoft/TypeScript#4922), so I was a bit hesitant whether to report it or not.
Do you think that this can be handled somehow by ESBuild?
By the way, thank you for this amazing project 🙂
A workaround for anyone landing here:
The text was updated successfully, but these errors were encountered: