reports/frontend/node_modules/es-toolkit/dist/compat/function/negate.d.mts
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

19 lines
No EOL
532 B
TypeScript

//#region src/compat/function/negate.d.ts
/**
* Creates a function that negates the result of the predicate function.
*
* @template T - The type of the arguments array.
* @param predicate - The predicate to negate.
* @returns The new negated function.
*
* @example
* function isEven(n) {
* return n % 2 == 0;
* }
*
* filter([1, 2, 3, 4, 5, 6], negate(isEven));
* // => [1, 3, 5]
*/
declare function negate<T extends any[]>(predicate: (...args: T) => boolean): (...args: T) => boolean;
//#endregion
export { negate };