Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise.{all,race} static method's iterable definitions incorrectly omit other definitions by overloading (regression) #19194

Open
falsandtru opened this issue Oct 15, 2017 · 6 comments
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript
Milestone

Comments

@falsandtru
Copy link
Contributor

es2015.iterable.d.ts must not omit es2015.promise.d.ts definitions by overloading. However, npm package distributions work correctly.

TypeScript Version: 2.6.0 RC for Visual Studio 2015

Code

Promise.all([0, 0]);

Expected behavior:

Should use definitions of es2015.promise.d.ts.

Promise.all([0, 0]); // Promise<[number, number]>

Actual behavior:

Uses definitions of es2015.iterable.d.ts.

Promise.all([0, 0]); // Promise<number[]>
@mhegazy mhegazy added Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript labels Oct 16, 2017
@mhegazy mhegazy added this to the TypeScript 2.7 milestone Oct 16, 2017
@weswigham
Copy link
Member

I can't repro this. Is your TS version for that project set to 2.6?:
image
If it's still 2.3, you'll end up using the 2.3 lib, which has this bug.

@falsandtru
Copy link
Contributor Author

@weswigham
Copy link
Member

weswigham commented Oct 16, 2017

I don't seem to have an issue with your project using the 2.6 RC SDK:
image

@weswigham
Copy link
Member

weswigham commented Oct 16, 2017

Oh, wait, you said VS 2015, and I've been looking at 2017. That's probably important. Well, at least I know this is minimally isolated to vs2015.

@weswigham
Copy link
Member

Confirmed in vs2015 only:
image

The files are still ordered correctly in the library files, so I can only assume this is because the vs2015 extension is loading the TS library files in some other order than what is specified. Either that, or.... this is the only extension where we still use chakra, so we may be relying on object insertion ordering somewhere? Continuing to look into this.

@falsandtru
Copy link
Contributor Author

Thanks for your investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants