/** * Run an async function over all items in the array, with a specific concurrency limit. * * @param items - The array of items to process. * @param concurrency - The maximum number of concurrent executions. * @param fn - Async function to run for each item. Receives the item and its index. * @returns A Promise resolving to an array of PromiseSettledResult objects, preserving input order. * * Each result is a { status, value } or { status, reason } object, as from Promise.allSettled(). * The pool will never run more than `concurrency` functions at once. */ export declare function runWithConcurrency(items: T[], concurrency: number, fn: (item: T, index: number) => Promise): Promise[]>;