Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
cae411eae7
commit
1c411e402e
19809 changed files with 1962608 additions and 97 deletions
35
frontend/node_modules/es-toolkit/dist/array/mapAsync.d.mts
generated
vendored
Normal file
35
frontend/node_modules/es-toolkit/dist/array/mapAsync.d.mts
generated
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
//#region src/array/mapAsync.d.ts
|
||||
interface MapAsyncOptions {
|
||||
concurrency?: number;
|
||||
}
|
||||
/**
|
||||
* Transforms each element in an array using an async callback function and returns
|
||||
* a promise that resolves to an array of transformed values.
|
||||
*
|
||||
* @template T - The type of elements in the input array.
|
||||
* @template R - The type of elements in the output array.
|
||||
* @param array The array to transform.
|
||||
* @param callback An async function that transforms each element.
|
||||
* @param [options] Optional configuration object.
|
||||
* @param [options.concurrency] Maximum number of concurrent async operations. If not specified, all operations run concurrently.
|
||||
* @returns A promise that resolves to an array of transformed values.
|
||||
* @example
|
||||
* const users = [{ id: 1 }, { id: 2 }, { id: 3 }];
|
||||
* const userDetails = await mapAsync(users, async (user) => {
|
||||
* return await fetchUserDetails(user.id);
|
||||
* });
|
||||
* // Returns: [{ id: 1, name: '...' }, { id: 2, name: '...' }, { id: 3, name: '...' }]
|
||||
*
|
||||
* @example
|
||||
* // With concurrency limit
|
||||
* const numbers = [1, 2, 3, 4, 5];
|
||||
* const results = await mapAsync(
|
||||
* numbers,
|
||||
* async (n) => await slowOperation(n),
|
||||
* { concurrency: 2 }
|
||||
* );
|
||||
* // Processes at most 2 operations concurrently
|
||||
*/
|
||||
declare function mapAsync<T, R>(array: readonly T[], callback: (item: T, index: number, array: readonly T[]) => Promise<R>, options?: MapAsyncOptions): Promise<R[]>;
|
||||
//#endregion
|
||||
export { mapAsync };
|
||||
Loading…
Add table
Add a link
Reference in a new issue