Skip to content

Conversation

@vvakame
Copy link
Member

@vvakame vvakame commented Apr 13, 2015

only support --target es6? or support es5 and es6 both?

@vvakame
Copy link
Member Author

vvakame commented Apr 15, 2015

Well... how to fix?

@basarat
Copy link
Member

basarat commented Apr 15, 2015

If an external module (in this case "acl") is split across multiple files you can only use stuff that has been exported.

@basarat
Copy link
Member

basarat commented Apr 15, 2015

Sorry. I've made it worse :) Investigating

@basarat
Copy link
Member

basarat commented Apr 15, 2015

I've provided the TS team with a sample : microsoft/TypeScript#2784

@basarat
Copy link
Member

basarat commented Apr 16, 2015

The reason why I thought I had a fix was that the files compile fine in isolation under different cases

@basarat
Copy link
Member

basarat commented Apr 16, 2015

So the fix recommended by the TS team (microsoft/TypeScript#2784 (comment)) is to use a ghost module. I'm thinking of calling it AclTypes 👍

Note: I'll do the work and commit in about 6 hours

@basarat
Copy link
Member

basarat commented Apr 17, 2015

So can't declare inside "foo" if it has an export = as only a single thing can have an export if we use export =. And if I move to AclTypes then I can't use import http = require("http")

So now I need to move stuff from "http" out into the ghost NodeJS module => other stuff that "http".ServerRequest depends upon like net and events needs to be moved too 😭

@basarat
Copy link
Member

basarat commented Apr 17, 2015

@vvakame are you okay with me completely opening up node.d.ts. Ofcourse it will be a lot of work and I might stumble on more refactoring needed in the process.

@vvakame
Copy link
Member Author

vvakame commented Apr 18, 2015

@basarat wow, thank you basarat! it is big incident...

@vvakame
Copy link
Member Author

vvakame commented Apr 29, 2015

----------------- For file:react/legacy/react-0.12-tests.ts
react/legacy/react-0.12.d.ts(927,5): error TS2309: An export assignment cannot be used in a module with other exported elements.

Hmm?

@basarat
Copy link
Member

basarat commented Apr 29, 2015

Hmm?

saw the same thing : microsoft/TypeScript#2784 (comment)

In this reduced example : microsoft/TypeScript#2784 (comment)

Basically there is an implicit export of Foo if its used in b.d.ts below:

a.d.ts (which compiles fine in isolation) without any error:

declare module "foo" {
    interface Foo {
        a: number;
    }
    var _:Foo;
    export = _;
}

And b.d.ts that plans to add stuff to module foo's Foo interface:

/// <reference path="./a"/>

declare module "foo" {
    interface Foo {
        b: number;
    }
}

@vvakame
Copy link
Member Author

vvakame commented Apr 29, 2015

@basarat It seems to do not reopen external module in react/legacy/react-0.12-tests.ts and react/legacy/react-0.12.d.ts. isn't it?

@basarat
Copy link
Member

basarat commented Apr 29, 2015

isn't it?

This is effectively what you did to fix acl as well

@vvakame
Copy link
Member Author

vvakame commented Apr 29, 2015

@basarat umm.. sorry, I am not understanding yet... can you make a commit?

@basarat
Copy link
Member

basarat commented Apr 29, 2015

can you make a commit?

Here is a sample:

demo

It seems to do not reopen external module

Yes. Exactly.

@basarat
Copy link
Member

basarat commented Apr 29, 2015

Note I do not see this error in our case locally :

image

But I am on typescript master so perhaps worth pointing typescript to : https://github.com/Arnavion/typescript-github/releases/tag/2015-04-26-218e1012a2e671ca70be3c1b9edf0db092e4c5c2 Details : https://github.com/Arnavion/typescript-github#install

@vvakame
Copy link
Member Author

vvakame commented Jul 19, 2015

ready to merge! 7/20 is release day of VisualStudio 2015.

@vvakame
Copy link
Member Author

vvakame commented Jul 19, 2015

I think we need test bed of es6 target.
my proposal. test with --target es6 option if definition has *-tests.es6.ts postfix.

@basarat @horiuchi what do you think?

@basarat
Copy link
Member

basarat commented Jul 19, 2015

test with --target es6 option if definition has *-tests.es6.ts postfix

👍 from me

BTW thanks for all the hard work on this update 💯

@vvakame
Copy link
Member Author

vvakame commented Jul 19, 2015

✨ 😺 ✨

vvakame added a commit that referenced this pull request Jul 20, 2015
[WIP] start support for tsc 1.5.0-beta
@vvakame vvakame merged commit bbe26ea into master Jul 20, 2015
@vvakame
Copy link
Member Author

vvakame commented Jul 20, 2015

TypeScript 1.5.3 released!

@vvakame
Copy link
Member Author

vvakame commented Jul 20, 2015

oops. I I forgot update package.json...

@vvakame vvakame deleted the tsc-1.5.0-alpha branch July 21, 2015 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants