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

introduce promiseWithResolvers helper #3902

Merged
merged 1 commit into from
Jun 5, 2023

Conversation

robrichard
Copy link
Contributor

@robrichard robrichard commented Jun 1, 2023

Promise.withResolvers is currently a stage 2 proposal for JS. This adds an equivalent jsutil to standardize usage.

@netlify
Copy link

netlify bot commented Jun 1, 2023

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit 1e074c4
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/6478f692e2c35d00082e9968
😎 Deploy Preview https://deploy-preview-3902--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

github-actions bot commented Jun 1, 2023

Hi @robrichard, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@robrichard robrichard requested a review from a team June 1, 2023 19:53
Copy link
Contributor

@yaacovCR yaacovCR left a comment

Choose a reason for hiding this comment

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

this looks great.

i wonder if in terms of the ECMA construct if it wouldn't be even better to have different versions of this; if the caller doesn't need access to reject, maybe a different method could only return resolve and then it can be known that the promise will never throw....

but that is not for us I suppose :)

@yaacovCR yaacovCR requested review from a team and removed request for IvanGoncharov June 2, 2023 11:04
@yaacovCR yaacovCR added the PR: polish 💅 PR doesn't change public API or any observed behaviour label Jun 2, 2023
@yaacovCR yaacovCR merged commit d22d32d into graphql:main Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: polish 💅 PR doesn't change public API or any observed behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants