You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
You're right, you can't use <T> for type assertions within .tsx files. However, in my example, I'm not using a type assertion and I'm also not within a .tsx file — I'm just declaring a type parameter to make the function generic. TypeScript happily compiles the code.
The issue is not limited to type assertions, it applies to any ambiguous constructs. This is one such construct. TypeScript cannot compile this with jsx enabled, which as you said is the case here.
This, therefore, comes under #399, so I am going to close this.
What version of TypeScript are you using?
2.6.2
What version of
typescript-eslint-parser
are you using?11.0.0
What code were you trying to parse?
index.ts within a TypeScript project with JSX enabled:
What did you expect to happen?
No parsing error.
What happened?
A parsing error:
The text was updated successfully, but these errors were encountered: