import type { Operation, Yielded } from "./types.js"; /** * Block and wait for all of the given operations to complete. Returns * an array of values that the given operations evaluated to. This has * the same purpose as * [Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all). * * If any of the operations become errored, then `all` will also become errored. * * @example * ``` javascript * import { all, expect, main } from 'effection'; * * await main(function*() { * let [google, bing] = yield* all([ * expect(fetch('http://google.com')), * expect(fetch('http://bing.com')), * ]); * // ... * }); * ``` * * @param ops a list of operations to wait for * @returns the list of values that the operations evaluate to, in the order they were given * @since 3.0 */ export declare function all[] | []>(ops: T): Operation>; /** * This type allows you to infer heterogenous operation types. * e.g. `all([sleep(0), expect(fetch("https://google.com")])` * will have a type of `Operation<[void, Request]>` */ type All[] | []> = { -readonly [P in keyof T]: Yielded; }; export {};