The array of promises to wait to be resolved / rejected before resolving or rejecting the new promise
Optional
timeout: numberOptional deadline timeout to wait before processing the items, defaults to undefined. If the number of milliseconds represented by this parameter has elapsed and the callback has not already been called, then a task to execute the callback is queued in the event loop (even if doing so risks causing a negative performance impact). timeout must be a positive value or it is ignored.
Returns an idle Promise instance that resolves to an array of the results from the input promises. This returned promise will resolve and execute it's pending chained operations asynchronously using the
requestIdleCallback
API (if available) with the optional provided timeout value to schedule when the chained items will be executed. It rejects immediately upon any of the input promises rejected or non-promises throwing an error, and will reject with this first rejection message / error. When resolved or rejected any additional chained operations will execute asynchronously using therequestIdleCallback
API (if available) with the optional provided timeout value to schedule when the chained items will be executed. (eg.then()
;catch()
;finally()
).