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

TS 2.0 construct support #90

Closed
jkillian opened this issue Sep 16, 2016 · 6 comments
Closed

TS 2.0 construct support #90

jkillian opened this issue Sep 16, 2016 · 6 comments

Comments

@jkillian
Copy link

jkillian commented Sep 16, 2016

A list of TS-2.0 constructs that we'll need to watch out for:

Module declarations, for example shorthand ambient module declarations (#50):

declare module "foo/*";

The non-null assertion operator:

function processEntity(e?: Entity) {
    validateEntity(e);
    let s = e!.name;  // Assert that e is non-null and access name
}

Typed usages of this (this is not really a parameter):

function f(this: void) {
    // make sure `this` is unusable in this standalone function
}

This is not necessarily a complete list.

@oojacoboo
Copy link

Any updates on 2.0 support? npm -i typescript will now give you 2.0.3. It'd be nice to have eslint support.

@JamesHenry
Copy link
Member

@oojacoboo it depends on whether or not you are using TypeScript 2.0-only syntax in your project... I am currently able to lint a large TypeScript codebase with this parser and TypeScript 2, because no backwards incompatible syntax is being used.

Full support for the new sytnax will definitely be coming soon regardless.

@oojacoboo
Copy link

Thanks James, may be going the tslint route and sticking with strict typescript linting the more I review the overall setup and trying to eliminate some module complexity.

@TrySound
Copy link

@JamesHenry The problem is npm which fails caz peerDependency is not valid. Can you extend version range?

@nzakas
Copy link
Member

nzakas commented Oct 7, 2016

Our problem is that there are changes in TypeScript 2.0 that cause this project not to work properly, so simply changing the acceptable version of TypeScript isn't a fix. @JamesHenry is away until next week, and his plan is to start on formal 2.0 support when he returns.

@JamesHenry JamesHenry mentioned this issue Oct 13, 2016
10 tasks
@JamesHenry
Copy link
Member

I am back now and keen to get TS 2 support in ASAP. Please follow along on #105 for progress

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

No branches or pull requests

6 participants