-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fail to parse typescript type assertion syntax #68
Comments
The error thrown is
|
yes, this is a known issue, fix is not hard: we are enabling "jsx" babel plugin for all file types, what we should do is only enable "jsx" for react file types. It's a relatively simple change if anybody is interested. You can start from here |
JSX is not specific to React; it's used by many different libraries. |
@ehaynes99 the current thinking is to only remove 'jsx' babel plugin from Based on these discussions (microsoft/TypeScript#26489 and microsoft/TypeScript#30503), typescript standard is to allow 'jsx' syntax only for |
I think it's safe to consider bracket-style type assertions and It's NOT safe to remove the jsx plugin for Finally, it's a misnomer to equate React and JSX. It's the most popular library using it, but certainly not the only one. |
Here is a PR that allows for distinct handling of the 3 types. I also did a bit of cleanup on the parser test. |
Hi, i think the parser fails at angular bracket type assertion syntax, is this an known issue?
The text was updated successfully, but these errors were encountered: