GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(lib/es2020): Add `Promise.allSettled(…)` by ExE-Boss · Pull Request #34065 · microsoft/TypeScript

Conversation

@ExE-Boss

@ExE-Boss ExE Boss (ExE-Boss) commented Oct 12, 2019 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Depends on #33707 (I’ve now inlined the Awaited<T> type)


Fixes #31083
Closes #31085


review?(Wenlu Wang (@Kingwl))

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chicoxyzzy, tonivj5, tkrotoff, busybeaver, mvarendorff, aecorredor, fastfrwrd, todorone, and aaliakseyeu reacted with thumbs up emoji tonivj5, aecorredor, fastfrwrd, and herberthobregon reacted with heart emoji tonivj5, aecorredor, and fastfrwrd reacted with rocket emoji
All reactions
  • 👍 9 reactions
  • ❤️ 4 reactions
  • 🚀 3 reactions
ExE Boss (ExE-Boss) added 2 commits October 12, 2019 14:25
@ExE-Boss
feat(lib/es2020): Add Promise.allSettled(…)
04fcd7b
@ExE-Boss
test(lib): Update tests to account for es2020.promise
ee3df7f
@ExE-Boss ExE Boss (ExE-Boss) mentioned this pull request Oct 14, 2019
feat(node): v12.11 DefinitelyTyped/DefinitelyTyped#39116
Merged
9 tasks done
@ExE-Boss
fix(lib/es2020): Promise.allSettled(…) takes Iterable argument
829f973
Jessidhia
Jessica Franco (Jessidhia) reviewed Oct 15, 2019
View reviewed changes
Comment thread src/lib/es2020.promise.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Kingwl
Wenlu Wang (Kingwl) approved these changes Oct 15, 2019
View reviewed changes

@Kingwl Wenlu Wang (Kingwl) left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

hilleer and ExE-Boss reacted with hooray emoji
All reactions
  • 🎉 2 reactions
@ExE-Boss
refactor(lib/es2020): Rename Promise.allSettled(…) return type
1b6c771
@trmaphi

Truong Ma Phi (trmaphi) commented Oct 24, 2019

Copy link
Copy Markdown

LGTM

ExE-Boss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ExE-Boss ExE Boss (ExE-Boss) mentioned this pull request Oct 28, 2019
TypeScript 3.7 Iteration Plan #33352
Closed
@graup

Paul Grau (graup) commented Nov 7, 2019

Copy link
Copy Markdown

I guess this code can be simplified similarly to #33707 ?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@SimonSchick

Simon Schick (SimonSchick) commented Nov 7, 2019

Copy link
Copy Markdown
Contributor

Nope, typings for node still need to support 2.1 until further notice.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ExE-Boss

ExE Boss (ExE-Boss) commented Nov 7, 2019

Copy link
Copy Markdown
Contributor Author

I first need #33707 to be merged, so that I can get access to the Awaited<T> type.

aecorredor reacted with heart emoji aecorredor reacted with rocket emoji
All reactions
  • ❤️ 1 reaction
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ExE-Boss ExE Boss (ExE-Boss) mentioned this pull request Nov 13, 2019
TypeScript 3.8 lib.d.ts updates #34772
Closed
2 tasks done
@ExE-Boss
feat(lib/es2020): Simplify Promise.allSettled(…) type declaration
be97a6b
SimonSchick
Simon Schick (SimonSchick) reviewed Dec 19, 2019
View reviewed changes
Comment thread src/lib/es2020.promise.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) reviewed Dec 23, 2019
View reviewed changes
Comment thread src/lib/es2020.promise.d.ts Outdated
* @param values An array of Promises.
* @returns A new Promise.
*/
allSettled<T extends readonly any[] | readonly [any]>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<T[P] extends PromiseLike<infer U> ? U : T[P]> }>;

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Dec 23, 2019

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make these readonly unknown[] | readonly [unknown]? (Ryan Cavanaugh (@RyanCavanaugh) Ron Buckton (@rbuckton))

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
brainkim
Brian Kim (brainkim) reviewed Dec 29, 2019
View reviewed changes
Comment thread src/lib/es2020.promise.d.ts Outdated
@@ -0,0 +1,29 @@
interface PromiseResolvedResult<T> {

@brainkim Brian Kim (brainkim) Dec 29, 2019

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Drive-by code review here. Shouldn’t this be named something like PromiseFulfilledResult to adhere to the states and fates terminology? I think the reason calling it PromiseResolvedResult is incorrect here is that while all fulfilled promises are resolved, not all resolved promises are fulfilled. A promise can be resolved to a pending promise, in which case it has not settled, and it can also be resolved to a rejected promise, in which case it has not fulfilled.

If my interpretation of states and fates terminology is correct, shouldn’t the correct name of this interface be PromiseFulfilledResult?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

SimonSchick and ExE-Boss reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@ExE-Boss
Merge branch 'master' into lib/es2020/add-promise-allsettled
926c561
@ExE-Boss
ExE Boss (ExE-Boss) force-pushed the lib/es2020/add-promise-allsettled branch from ec3628c to 2929aad Compare January 2, 2020 17:01
@ExE-Boss
refactor(lib/es2020): Improve naming of Promise.allSettled(…) types
2929aad
@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) assigned Wesley Wigham (weswigham) and Ron Buckton (rbuckton) Jan 3, 2020
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) merged commit 5a34274 into microsoft:master Jan 3, 2020
@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Jan 3, 2020

Copy link
Copy Markdown
Member

Thank you!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ExE-Boss
ExE Boss (ExE-Boss) deleted the lib/es2020/add-promise-allsettled branch January 3, 2020 21:03
@SimonSchick

Simon Schick (SimonSchick) commented Jan 3, 2020

Copy link
Copy Markdown
Contributor

Still feel like it should've used unknown for better type safety 🤷‍♂

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sanglt1902

sanglt (sanglt1902) commented Mar 4, 2020

Copy link
Copy Markdown

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pabo99 Juan Pablo Gómez Aguilar (pabo99) mentioned this pull request Jun 26, 2020
Agregando el archivo TypeScript para el componente de Course Edit omegaup/omegaup#4274
Merged
5 of 7 tasks
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) DanielRosenwasser left review comments
+4 more reviewers
@Jessidhia Jessica Franco (Jessidhia) Jessidhia left review comments
@brainkim Brian Kim (brainkim) brainkim left review comments
@SimonSchick Simon Schick (SimonSchick) SimonSchick left review comments
@Kingwl Wenlu Wang (Kingwl) Kingwl approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@weswigham Wesley Wigham (weswigham)

@rbuckton Ron Buckton (rbuckton)

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

proposal-promise-allSettled

Uh oh!

There was an error while loading. Please reload this page.

11 participants

@ExE-Boss @trmaphi @graup @SimonSchick @DanielRosenwasser @sanglt1902 @Jessidhia @brainkim @Kingwl @weswigham @rbuckton
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.