/** * Map over `items` running at most `limit` invocations of `mapper` at once, * resolving to results in input order. Mirrors `Promise.allSettled`: the * returned promise never rejects — a `mapper` that throws produces a * `{ status: "rejected", reason }` slot and the remaining work continues. * * Use instead of `Promise.allSettled(items.map(mapper))` whenever each task is * heavyweight (spawns a process, holds memory, hits a rate-limited API): an * unbounded fan-out over N items spawns N tasks at once and falls over at * scale, whereas this keeps a fixed working set regardless of N. * * `limit` is clamped to `[1, items.length]`. */ export declare function mapSettledWithConcurrency(items: readonly T[], limit: number, mapper: (item: T, index: number) => Promise): Promise>>;