/** * Process items in parallel with controlled concurrency. * Unlike Promise.all which starts all promises at once, this limits * how many are running at any time. * * @param items - Items to process * @param fn - Async function to apply to each item * @param concurrency - Maximum number of concurrent operations (default: 10) * @returns Promise resolving to results in the same order as items * * @example * ```typescript * const results = await mapWithConcurrency( * files, * async (file) => processFile(file), * 10 // max 10 concurrent file operations * ); * ``` */ export declare function mapWithConcurrency(items: T[], fn: (item: T, index: number) => Promise, concurrency?: number): Promise; /** * Process items in batches, where each batch is processed in parallel. * Useful when you want to process groups at a time with progress reporting. * * @param items - Items to process * @param fn - Async function to apply to each item * @param batchSize - Number of items per batch * @param onBatchComplete - Optional callback after each batch completes * @returns Promise resolving to results in the same order as items */ export declare function mapInBatches(items: T[], fn: (item: T, index: number) => Promise, batchSize?: number, onBatchComplete?: (completedCount: number, totalCount: number) => void): Promise; //# sourceMappingURL=concurrency.d.ts.map