@sap-cloud-sdk/util
Version:
SAP Cloud SDK for JavaScript general utilities
9 lines (8 loc) • 439 B
TypeScript
/**
* Await all promises and resolve if non of them failed.
* Reject if at least one of them was rejected, but only once all of them are finished.
* Throws an error consisting of a list of reasons.
* @param promises - Promises to settle.
* @param errorMessage - Message to use as introductory text of the error if an error occurs.
*/
export declare function finishAll(promises: Promise<any>[], errorMessage?: string): Promise<void>;