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
Casting to 'const' should work as const assertions in TypeScript typically works. I.e. that code shouldn't fail.
Playground URL: https://esbuild.github.io/try/#dAAwLjIwLjIAAGV4cG9ydCBjb25zdCBwcmV2aWV3Q2FyZHMgPSBbCiAgewogICAgdGl0bGU6ICJBYm91dCB1cyIsCiAgICB0ZXh0OiAibG9yZW0gaXBzdW0iLAogICAgY3RhOiAic3VibWl0IiwKICAgIGFsdDogIlBlcnNvbiBzbWlsaW5nIGF3YXkgZnJvbSB0aGVpciBwaG9uZSIsCiAgfSwKICB7CiAgICB0aXRsZTogIkZvciBvdXIgY3VzdG9tZXJzIiwKICAgIHRleHQ6ICJsb3JlbSBpcHN1bSIsCiAgICBjdGE6ICJzdWJtaXQiLAogICAgYWx0OiAiUGVyc29uIHNtaWxpbmcgdGhyb3VnaCB3aW5kb3ciLAogIH1dIGFzIGNvbnN0Ow
Linked issue: withastro/compiler#997
The text was updated successfully, but these errors were encountered:
You should enable --loader=ts to tell esbuild the input is in TypeScript (default is JavaScript).
--loader=ts
Sorry, something went wrong.
Yes, compiling TypeScript as JavaScript is expected to not work on TypeScript-only syntax. Compiling TypeScript as TypeScript works as expected.
I'm closing this issue as this is not a bug with esbuild.
No branches or pull requests
Casting to 'const' should work as const assertions in TypeScript typically works. I.e. that code shouldn't fail.
Playground URL: https://esbuild.github.io/try/#dAAwLjIwLjIAAGV4cG9ydCBjb25zdCBwcmV2aWV3Q2FyZHMgPSBbCiAgewogICAgdGl0bGU6ICJBYm91dCB1cyIsCiAgICB0ZXh0OiAibG9yZW0gaXBzdW0iLAogICAgY3RhOiAic3VibWl0IiwKICAgIGFsdDogIlBlcnNvbiBzbWlsaW5nIGF3YXkgZnJvbSB0aGVpciBwaG9uZSIsCiAgfSwKICB7CiAgICB0aXRsZTogIkZvciBvdXIgY3VzdG9tZXJzIiwKICAgIHRleHQ6ICJsb3JlbSBpcHN1bSIsCiAgICBjdGE6ICJzdWJtaXQiLAogICAgYWx0OiAiUGVyc29uIHNtaWxpbmcgdGhyb3VnaCB3aW5kb3ciLAogIH1dIGFzIGNvbnN0Ow
Linked issue: withastro/compiler#997
The text was updated successfully, but these errors were encountered: