Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Fail in Typescript 2.0 shorthand ambient module declarations #50

Closed
muzuiget opened this issue Jul 28, 2016 · 15 comments
Closed

Fail in Typescript 2.0 shorthand ambient module declarations #50

muzuiget opened this issue Jul 28, 2016 · 15 comments
Labels

Comments

@muzuiget
Copy link

TypeScript 2.0 support shorthand ambient module declarations

declare module "*.csv";
declare module "*.scss";

Current typescript-eslint-parser will report Parsing error: '{' expected. on this statements;

@nzakas
Copy link
Member

nzakas commented Jul 28, 2016

This is expected as this project is not yet complete. I'll leave this open to track.

@nzakas nzakas added bug and removed triage labels Jul 28, 2016
@JamesHenry
Copy link
Member

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!

@amcdnl
Copy link

amcdnl commented Aug 16, 2016

@JamesHenry TS 2.0 IS stable. They are working on 2.1 right now.

@JamesHenry
Copy link
Member

@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! 😄

unspecified-4

unspecified-5

@amcdnl
Copy link

amcdnl commented Aug 16, 2016

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.

@nzakas
Copy link
Member

nzakas commented Aug 19, 2016

Seems like this should work now. Can anyone verify?

@JamesHenry
Copy link
Member

@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

@nzakas
Copy link
Member

nzakas commented Aug 19, 2016

What if we change it to *?

@JamesHenry
Copy link
Member

JamesHenry commented Aug 22, 2016

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?

@JamesHenry
Copy link
Member

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

@nzakas
Copy link
Member

nzakas commented Aug 24, 2016

That's a fair point.

@JamesHenry
Copy link
Member

JamesHenry commented Aug 30, 2016

TypeScript 2 just hit RC https://blogs.msdn.microsoft.com/typescript/2016/08/30/announcing-typescript-2-0-rc/

This RC gives an idea of what the full version of 2.0 will look like, and we’re looking for broader feedback to stabilize and make 2.0 a solid release. Overall, the RC should be stable enough for general use, and we don’t expect any major new features to be added past this point.

@nzakas
Copy link
Member

nzakas commented Aug 30, 2016

@JamesHenry should we be upgrading? I'll rely on your expertise and advice for that decision.

@JamesHenry
Copy link
Member

JamesHenry commented Sep 1, 2016

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.

@JamesHenry
Copy link
Member

TypeScript 2 upgrade is completed in #112

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

No branches or pull requests

5 participants