Promise.resolve(value) returns a promise for value. A plain value becomes a fulfilled promise. A native promise comes back as the very same promise, with no copy. A thenable (an object with a then() method) is followed, and the new promise gets its result, good or bad. So one code path can handle “a value or a promise”.
Remember
Promise.resolve(5) → new promise, fulfilled with 5
Promise.resolve(p) → p itself (when p is a native Promise)
Promise.resolve(thenable) → new promise that follows thenable
Promise.resolve() → fulfilled with undefined
p === Promise.resolve(p) → true
Syntax
Call resolve on the Promise constructor with a value, a promise, or nothing.
JavaScript
Promise.resolve()
Promise.resolve(value)
Call
What it does
Promise.resolve()
A promise fulfilled with undefined. Handy as the start of a chain.
Promise.resolve(value)
A promise fulfilled with value.
Promise.resolve(promiseOrThenable)
The same promise, or a new promise that follows the thenable.
Built into JavaScript since ES2015 (ES6).
Library declarations
JavaScript
Promise.resolve(value) // returns a Promise
// value: any value, a Promise, or a thenable
Parameters
Parameter
Description
value
Optional. A plain value, a promise, or a thenable. A thenable is asked for its result through its then() method.
Return Value
Return Value
Description
Promise (same object)
When value is a native promise, that exact promise comes back, whatever its state.
Promise (new object)
Fulfilled with a plain value, or following the thenable. It is rejected if the thenable rejects or throws.
JavaScript Examples
Example 1 — Promise.resolve(p) Returns p
Wrap a promise, wrap a plain number, and compare the results with ===.
One function, two kinds of answer.loadName(1) returns the string "Asha" at once. loadName(2) returns a promise fulfilled after 30 milliseconds.
Wrap before you chain.Promise.resolve(loadName(1)) is always a promise, so .then() is safe. On a plain string it would fail.
A returned promise is followed. The first then returns another wrapped result. The second then waits for it and receives "User 2".
Compatibility
Browser & Runtime Support
Promise.resolve() is part of ES2015 (ES6), together with the Promise object itself.
✓ Baseline · ES2015
Promise.resolve()
Supported in every modern browser, plus Node.js, Deno, and Bun.
98%Modern browser support
Google ChromeAll modern versions
Full support
Mozilla FirefoxAll modern versions
Full support
Apple SafariAll modern versions
Full support
Microsoft EdgeAll modern versions
Full support
Node.jsAll current releases
Supported
DenoAll releases
Supported
Internet ExplorerNo native support
Not supported
Promise.resolve()Excellent
Bottom line: Safe in every modern browser and runtime. The examples print plain strings, so the output is the same in Node.js and in the browser.
Frequently Asked Questions
A promise. A plain value gives a new promise fulfilled with it. A native promise comes back as is. A thenable gives a new promise that follows it.
No. For a native promise you get the same object back, so Promise.resolve(p) === p is true. A plain value or a thenable always gives a new promise.
Any object with a then() method, such as a promise from an older library. Promise.resolve() converts it into a real promise, so catch(), finally(), and await work on it.
The constructor always makes a new promise, even when value is already one. Promise.resolve(value) reuses a native promise and is shorter to write.
Yes. If you pass a rejected promise, or a thenable that rejects, the result is rejected. Resolve means "follow this value", not "succeed". Use catch() as usual.