We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have upgraded esbuild-loader to avoid the node 18 bug in webpack, and suddenly we are getting syntax errors which are not being reported by tsc.
It seems that it can no longer parse this line:
const foo = async <T>(bar:T): Promise<T> => bar
The error thrown is Expected ")" but found ":"
Expected ")" but found ":"
I've added a repo which shows that when that file is consumed from stdin it fails, but passing the filename as an argument works as expected
https://github.com/charliematters/esbuild-issue
TODO
The text was updated successfully, but these errors were encountered:
This is the wrong repo - I'll move it
Sorry, something went wrong.
You didn't tell esbuild that the input is TypeScript.
Works fine when you do: https://hyrious.me/esbuild-repl/?version=0.17.16&mode=transform&input=const+foo+%3D+async+%3CT%3E%28bar%3AT%29%3A+Promise%3CT%3E+%3D%3E+bar&options=--loader%3Dts
Also, if you recently upgraded esbuild-loader to v3, see the migration guide: https://github.com/esbuild-kit/esbuild-loader/releases/tag/v3.0.0
No branches or pull requests
Bug description
We have upgraded esbuild-loader to avoid the node 18 bug in webpack, and suddenly we are getting syntax errors which are not being reported by tsc.
It seems that it can no longer parse this line:
The error thrown is
Expected ")" but found ":"
I've added a repo which shows that when that file is consumed from stdin it fails, but passing the filename as an argument works as expected
Minimal reproduction link
https://github.com/charliematters/esbuild-issue
Environment
Can you contribute a fix?
The text was updated successfully, but these errors were encountered: