- Notifications
You must be signed in to change notification settings - Fork13.2k
Better typings for promise.race based on conditional types#31117
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Following the feature - Mapped tuple typesmicrosoft#25947 - it is now possible to have better typings for Promise.race
DanielRosenwasser commentedApr 25, 2019
This is thanks to conditional types, not mapped types. It'd be nice to have a test of some sort (I'm sure we don't). Something simple like leta=Promise.race([Promise.resolve(10),Promise.resolve("hello")]); |
dubzzz commentedApr 26, 2019
@DanielRosenwasser You're right. I think my first commit was really using mapped types but I changed it following reviews 🤔 |
RyanCavanaugh commentedApr 30, 2019
@typescript-bot test this |
typescript-bot commentedApr 30, 2019 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Heya@RyanCavanaugh, I've started to run the extended test suite on this PR at7ee4e63. You can monitor the buildhere. It should now contribute to this PR's status checks. |
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
You can include es2015.promise.d.ts without es2015.iterable.d.ts. It wasmoved to es2015.promise.d.ts inmicrosoft#31117
Component commits:c28ee65 Revert "Better typings for Promise.resolve(), likemicrosoft#31117 (microsoft#33074)"This reverts commit040c121.
Component commits:c28ee65 Revert "Better typings for Promise.resolve(), likemicrosoft#31117 (microsoft#33074)"This reverts commit040c121.Co-authored-by: Nathan Shively-Sanders <nathansa@microsoft.com>
Following the feature - Mapped tuple types#25947 - it is now possible to have better typings for Promise.race
From@dubzzz before I messed up his fork