/** * Applies a callback to each item of `array` and wraps * the result in a `Promise.all`. * * @group Utils * @category Async * @example * ``` * await all(sinks, sink => sink.close()) * // :this: is syntactical sugar for: * await Promise.all(sinks.map(sink => sink.close())) * ``` */ export declare function all(array: T[], map: (item: T, index: number, array: T[]) => unknown): Promise; /** * Returns a promise that resolves in `ms` milliseconds. * * @group Utils * @category Async */ export declare function timeout(ms?: number): Promise; export declare function timeout(ms: number, value: T, signal?: AbortSignal): Promise; /** * Returns a promise and a way to resolve or reject it. * * @group Utils * @category Async */ export declare function defer(): { promise: Promise; resolve: (value: T | PromiseLike) => void; reject: (reason?: unknown) => void; }; //# sourceMappingURL=Async.d.ts.map