Creates a new Promise.
A callback used to initialize the promise. This callback is passed two arguments: a resolve callback used to resolve the promise with a value or the result of another promise, and a reject callback used to reject the promise with a provided reason or error.
Optional
reason: anyReadonly
[toStatic
Readonly
[species]Attaches a callback for only the rejection of the Promise.
Optional
onrejected: null | ((reason) => TResult | PromiseLike<TResult>)The callback to execute when the Promise is rejected.
A Promise for the completion of the callback.
Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The resolved value cannot be modified from the callback.
Optional
onfinally: null | (() => void)The callback to execute when the Promise is settled (fulfilled or rejected).
A Promise for the completion of the callback.
Attaches callbacks for the resolution and/or rejection of the Promise.
Optional
onfulfilled: null | ((value) => TResult1 | PromiseLike<TResult1>)The callback to execute when the Promise is resolved.
Optional
onrejected: null | ((reason) => TResult2 | PromiseLike<TResult2>)The callback to execute when the Promise is rejected.
A Promise for the completion of which ever callback is executed.
Static
allCreates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
An iterable of Promises.
A new Promise.
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve, or rejected when any Promise is rejected.
An array of Promises.
A new Promise.
Static
allCreates a Promise that is resolved with an array of results when all of the provided Promises resolve or reject.
An array of Promises.
A new Promise.
Creates a Promise that is resolved with an array of results when all of the provided Promises resolve or reject.
An array of Promises.
A new Promise.
Static
raceCreates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
An iterable of Promises.
A new Promise.
Creates a Promise that is resolved or rejected when any of the provided Promises are resolved or rejected.
An array of Promises.
A new Promise.
Static
rejectStatic
resolveCreates a new resolved promise.
A resolved promise.
Creates a new resolved promise for the provided value.
A promise.
A promise whose internal state matches the provided promise.
Creates a new resolved promise for the provided value.
A promise.
A promise whose internal state matches the provided promise.
An eventually loaded related model instance.