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

Update Promise reference: Promise.resolve description #28096

Merged
merged 1 commit into from
Jul 21, 2023

Conversation

zjlovezj
Copy link
Contributor

Description

Promise.resolve() doesn't always return a new Promise. For example, Promise.resolve(alreadyAPromise) will return alreadyAPromise.

Motivation

Readers might be confused about the "new Promise".

Additional details

It ("new Promise") may be copied from above line which is correct.
"Returns a new Promise object that is rejected with the given reason."

Related issues and pull requests

Promise.resolve() doesn't always return a new Promise.
For example, Promise.resolve(alreadyAPromise) will return alreadyAPromise.
@zjlovezj zjlovezj requested a review from a team as a code owner July 21, 2023 05:11
@zjlovezj zjlovezj requested review from Josh-Cena and removed request for a team July 21, 2023 05:11
@github-actions github-actions bot added the Content:JS JavaScript docs label Jul 21, 2023
Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Sure. Thank you!

@Josh-Cena Josh-Cena merged commit 29ab97e into mdn:main Jul 21, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants