export declare enum ResultStatus { FULFILLED = "fulfilled", FAILED = "failed" } type FulfiledResult = { status: ResultStatus.FULFILLED; value: T; }; type RejectedResult = { reason: any; status: ResultStatus.FAILED; }; /** * Will wait for all promises to resolve or reject, wrapping their real results in * object containing the status so it's easy to filter it later. Loosely inspired by * [Promise.allSettled](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/allSettled) * which can replace this implementation once it makes to the browsers. * @param promises */ export declare const waitForAllPromises: (promises: Promise[]) => Promise<(FulfiledResult | RejectedResult)[]>; /** * Will resolve on the first fulfilled promise and disregard the remaining ones. Similar to `Promise.race` but won't * care about rejected promises. * @param promises */ export declare const waitForFirstFulfilledPromise: (promises: Promise[]) => Promise; /** * Find all fullfilled promises and return their values * @param results */ export declare const getOnlyFulfilled: (results: (FulfiledResult | RejectedResult)[]) => T[]; export {};