Promise lifecycle: create resolved/rejected promises, chain .then/.catch/.finally, and flush microtasks.
Summary
Functions
Returns promise values as-is, otherwise wraps a value in a resolved Promise.
Runs queued microtasks until the queue is empty.
Creates a pending Promise state value.
Implements Promise.prototype.catch state transitions.
Implements Promise.prototype.finally state transitions.
Implements Promise.prototype.then state transitions.
Creates or returns a rejected Promise state value.
Resolves a Promise state and drains queued reactions.
Resolves a Promise state with normal Promise-resolution adoption.
Creates or returns a resolved Promise state value.
Functions
Returns promise values as-is, otherwise wraps a value in a resolved Promise.
Runs queued microtasks until the queue is empty.
Creates a pending Promise state value.
Implements Promise.prototype.catch state transitions.
Implements Promise.prototype.finally state transitions.
Implements Promise.prototype.then state transitions.
Creates or returns a rejected Promise state value.
Resolves a Promise state and drains queued reactions.
Resolves a Promise state with normal Promise-resolution adoption.
Creates or returns a resolved Promise state value.