Resolve
A resolve function is a Promise executor function that fulfills the promise with a value or makes it adopt a thenable’s eventual outcome.
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond
A function provided to a Promise executor that settles the promise successfully with a fulfillment value or thenable.
- How it is used
- Uses resolve to fulfill promises when callback-based tasks succeed or an asynchronous process completes.
- How deep it goes
- Defines resolve as an executor-supplied function and demonstrates it in callback wrappers and a canvas animation.
- Examples
- Demonstrates image loading, delays, geolocation, user registration, and canvas fading as promise-based tasks.
- What you can do after
- Apply it via the Promise constructor to fulfill a promise when callback-based work succeeds or an animation finishes.
Secrets of the JavaScript Ninja, Third Edition
A resolve function is the function associated with a promise that resolves it with a value or causes it to adopt a thenable's outcome.
- How it is used
- Controls a promise’s fate from its executor by fulfilling it directly or adopting a thenable’s outcome.
- How deep it goes
- Distinguishes ordinary values from thenables and shows adoption of fulfillment or rejection, without detailing thenable internals.
- Examples
- Uses omitted arguments yielding undefined and resolution with fulfilled or rejected promises.
- What you can do after
- Apply it by resolving a promise with a value or another promise to propagate its eventual outcome.
Read how Secrets of the JavaScript Ninja, Third Edition explains resolve →
Related concepts
- promiseconfigures · A JavaScript Promise is an object representing the eventual completion or failure of an asynchronous operation and its resulting value or reason.
- Promise.resolvecontrasts with · Promise.resolve is a JavaScript method that returns a promise adopting a supplied promise or thenable’s state, or fulfilled with a supplied non-thenable value.
Questions about resolve
What is resolve?
A resolve function is a Promise executor function that fulfills the promise with a value or makes it adopt a thenable’s eventual outcome.
Which Manning books explain resolve?
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond and Secrets of the JavaScript Ninja, Third Edition.
What is the difference between resolve and Promise.resolve?
A resolve function is a Promise executor function that fulfills the promise with a value or makes it adopt a thenable’s eventual outcome. Promise.resolve is a JavaScript method that returns a promise adopting a supplied promise or thenable’s state, or fulfilled with a supplied non-thenable value.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

