question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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[]>

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
weswighamcommented, Oct 17, 2017

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.

0reactions
falsandtrucommented, Oct 17, 2017

Thanks for your investigation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can we Overload or Override static methods in java
Let us first define Overloading and Overriding. ... This feature allows different methods to have the same name, but different signatures, ...
Read more >
Try out our new features page - Chrome Platform Status
Those two static methods return a promise that resolves to either "granted" or "denied" based on whether the user has allowed the user...
Read more >
doc - Apple Open Source
dfg/DFGClobberize.h: (JSC::DFG::clobberize): Remove the def() for MultiGetByOffset to ... DOM value iterable interfaces should use Array prototype methods ...
Read more >
java-concurrency-in-practice.pdf
may be called by more than one thread at a time without requiring any other action on the caller's part. Given definitions like...
Read more >
Part IV - Static Methods in the Promise API | Saurabh Misra
Promise.resolve() comes in very handy when we want to quickly create a promise object without going through the whole constructor and executor ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found