@thi.ng/transducers-async
Version:
Async versions of various highly composable transducers, reducers and iterators
16 lines • 613 B
TypeScript
import type { Fn, MaybePromise } from "@thi.ng/api";
/**
* Async iterator. Yields return values of given single-arg async function `fn`
* (called with `i`, current iteration count). If `n` is given, only that many
* values will be produced, else the iterator is infinite.
*
* @remarks
* If `delay>0` waits given number of milliseconds between each successive call
* to `fn`.
*
* @param fn
* @param n
* @param delay
*/
export declare function repeatedly<T>(fn: Fn<number, MaybePromise<T>>, n?: number, delay?: number): AsyncGenerator<Awaited<T>, void, unknown>;
//# sourceMappingURL=repeatedly.d.ts.map