Skip to content
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

JSX/TSX syntax is forced in TS code #181

Open
bushee opened this issue Mar 26, 2018 · 0 comments
Open

JSX/TSX syntax is forced in TS code #181

bushee opened this issue Mar 26, 2018 · 0 comments

Comments

@bushee
Copy link

bushee commented Mar 26, 2018

Since version 2.3.7, there was added TSX support. This has partially broken TS parsing, since TSX syntax is forced there.
The thing I stumbled upon:

const something = <MyInterface>castVar;

is considered illegal (it is in fact illegal in TSX, according to my knowledge, but is perfectly legal in TS). I was forced to rewrite it to:

const something = castVar as MyInterface;

But I would expect it to work as before and let me use both syntaxes.
I guess the problem is in the line that enables JSX support in TS parser's ECMA features - it should be enabled only for .tsx files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant