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
32
frontend/node_modules/es-toolkit/dist/function/before.d.ts
generated
vendored
Normal file
32
frontend/node_modules/es-toolkit/dist/function/before.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
//#region src/function/before.d.ts
|
||||
/**
|
||||
* Creates a function that limits the number of times the given function (`func`) can be called.
|
||||
*
|
||||
* @template F - The type of the function to be invoked.
|
||||
* @param n - The number of times the returned function is allowed to call `func` before stopping.
|
||||
* - If `n` is 0, `func` will never be called.
|
||||
* - If `n` is a positive integer, `func` will be called up to `n-1` times.
|
||||
* @param func - The function to be called with the limit applied.
|
||||
* @returns A new function that:
|
||||
* - Tracks the number of calls.
|
||||
* - Invokes `func` until the `n-1`-th call.
|
||||
* - Returns `undefined` if the number of calls reaches or exceeds `n`, stopping further calls.
|
||||
* @throws {Error} - Throw an error if `n` is negative.
|
||||
* @example
|
||||
*
|
||||
* const beforeFn = before(3, () => {
|
||||
* console.log("called");
|
||||
* })
|
||||
*
|
||||
* // Will log 'called'.
|
||||
* beforeFn();
|
||||
*
|
||||
* // Will log 'called'.
|
||||
* beforeFn();
|
||||
*
|
||||
* // Will not log anything.
|
||||
* beforeFn();
|
||||
*/
|
||||
declare function before<F extends (...args: any[]) => any>(n: number, func: F): (...args: Parameters<F>) => ReturnType<F> | undefined;
|
||||
//#endregion
|
||||
export { before };
|
||||
Loading…
Add table
Add a link
Reference in a new issue