/** Options for `runBatch()`. */ export interface BatchOptions { /** Items processed at once. Defaults to 3. */ concurrency?: number; /** Stops starting new items after the first failure. Off by default. */ stopOnError?: boolean; } /** The outcome of one batch item. */ export interface BatchItemResult { /** The item's position in the input. */ index: number; /** True when the worker returned a value. */ ok: boolean; /** The value returned. */ value?: T; /** Why the worker failed. */ error?: string; } /** * Runs a worker over items with bounded concurrency, collecting a result per item in input order. * Failures are recorded rather than thrown. */ export declare function runBatch(items: TInput[], worker: (item: TInput, index: number) => Promise, options?: BatchOptions): Promise>>;