-
-
Notifications
You must be signed in to change notification settings - Fork 75
Fail in Typescript 2.0 shorthand ambient module declarations #50
Comments
This is expected as this project is not yet complete. I'll leave this open to track. |
TypeScript 2 is also not yet stable 😄 , I think it would be very ambitious of us to be attempting to support beta versions of major TypeScript releases in this parser. Especially at this stage! |
@JamesHenry TS 2.0 IS stable. They are working on 2.1 right now. |
@amcdnl TypeScript 1.8.10 is the current stable release. The fact they are already on 2.1 for their beta simply means they are doing a good job of following semver, it does nothing to validate the stability of 2.x We will of course support the breaking changes/additions made in TypeScript 2.x in good time, but this project is not in a position to do that yet. The fact that it is still beta functionality is important for prioritisation with limited resources. All contributions are welcome! 😄 |
Odd, I thought it was done. They have certainly promoted it as such. Ya, totally get it. If I get time, I will certainly contrib. |
Seems like this should work now. Can anyone verify? |
@nzakas this relates to a new syntax in the upcoming TypeScript 2, so I would not currently expect it to work whilst we are using 1.8 to parse |
What if we change it to |
My concern around being entirely open is actually less do with syntax additions (as in this issue), and more about our use of the compiler within the parser. The main part of TypeScript which we are exposed to is the compiler API and this is subject to change across major versions as much as the high-level features are. We also use various TS utility methods for node conversion which could be changed. (They are usually called out here https://github.com/Microsoft/TypeScript/wiki/API-Breaking-Changes once a release is finalised/stable). It therefore feels safer for us to identify supported TypeScript versions explicitly. The range of supported versions may actually be fairly broad. What do you think? |
Out of curiosity I just tried running our test suite against the latest TypeScript 2.x beta build ([email protected]) and 2 of our JSX tests failed |
That's a fair point. |
TypeScript 2 just hit RC https://blogs.msdn.microsoft.com/typescript/2016/08/30/announcing-typescript-2-0-rc/
|
@JamesHenry should we be upgrading? I'll rely on your expertise and advice for that decision. |
Yes, I think we should, I will create an issue to track what needs updating. However, I still feel this is a lower priority than work on extending the eslint-plugin-typescript repo. We have made tremendous progress on the parser, and the only real blocker remaining for people is that core ESLint rules such a "semi" or "no-undef" are currently not able to pick up the non-js nodes. I think if we can cover a few fundamental rules like those, then the adoption of the parser could really start to grow and we would be able to locate any remaining bugs more quickly. |
TypeScript 2 upgrade is completed in #112 |
TypeScript 2.0 support shorthand ambient module declarations
Current typescript-eslint-parser will report
Parsing error: '{' expected.
on this statements;The text was updated successfully, but these errors were encountered: