-
-
Notifications
You must be signed in to change notification settings - Fork 75
Parsing error for generic function with index signature return type #393
Comments
I believe this behaviour is correct. The source you have provided is genuinely a parse error in TypeScript 2.4.x: (See the In 2.5.x it seems to produce a valid AST with this parser. Please feel free to reopen if you have any more information. |
The example is valid in TypeScript 2.4 and 2.5 only for You can try it here: https://github.com/OliverJAsh/typescript-eslint-parser-parse-error-test Therefore I do believe the example above should not produce an ESLint parse error for non-JSX files, i.e. |
Ah yes you are right and this then is the same case as the one I dug into yesterday: As outlined in that comment, you will need to disable I have opened an issue to see if we can make the setting inferrable from file extension in the long run: #399 |
Thank you, that makes sense! |
What version of TypeScript are you using?
2.4.1
What version of
typescript-eslint-parser
are you using?8
What code were you trying to parse?
What did you expect to happen?
No error
What happened?
The text was updated successfully, but these errors were encountered: