UNPKG

@promptbook/remote-server

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

25 lines (24 loc) 762 B
import type { Promisable } from 'type-fest'; /** * Options for for each async. */ type ForEachAsyncOptions = { /** * Maximum number of tasks running in parallel * * @default Infinity */ readonly maxParallelCount?: number; }; /** * Async version of Array.forEach * * @param array - Array to iterate over * @param options - Options for the function * @param callbackfunction - Function to call for each item * @deprecated [🪂] Use queues instead * * @public exported from `@promptbook/utils` */ export declare function forEachAsync<TItem>(array: ReadonlyArray<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: ReadonlyArray<TItem>) => Promisable<void>): Promise<void>; export {};