dojo/promise/first (version 1.10)

Summary

Takes multiple promises and returns a new promise that is fulfilled when the first of these promises is fulfilled.

Takes multiple promises and returns a new promise that is fulfilled when the first of these promises is fulfilled. Canceling the returned promise will not cancel any passed promises. The promise will be fulfilled with the value of the first fulfilled promise.

Usage

first(objectOrArray);
Parameter Type Description
objectOrArray Object | Array
Optional

The promises are taken from the array or object values. If no value is passed, the returned promise is resolved with an undefined value.

Returns:dojo/promise/Promise

See the dojo/promise/first reference documentation for more information.

Method Summary

Methods

Error in the documentation? Can’t find what you are looking for? Let us know!