//#region src/promise/parallel.d.ts /** * Executes multiple promises in parallel with a concurrency limit. * * @template T - The type of the resolved values * @param tasks - An array of functions that return promises * @param concurrency - The maximum number of concurrent promises (default: Infinity) * @returns Returns a promise that resolves with an array of results in the same order as tasks * * @example * const results = await parallel([ * () => fetchUser(1), * () => fetchUser(2), * () => fetchUser(3) * ], 2); // Max 2 concurrent requests * * @example * const results = await parallel([ * () => delay(100, 'a'), * () => delay(50, 'b'), * () => delay(150, 'c') * ]); // Executes all at once */ declare function parallel(tasks: Array<() => Promise | T>, concurrency?: number): Promise; //#endregion export { parallel }; //# sourceMappingURL=parallel.d.cts.map