typedash
Version:
modern, type-safe collection of utility functions
19 lines (18 loc) • 656 B
text/typescript
import { t as AnyFunction } from "./AnyFunction-C6KudB8p.cjs";
//#region src/functions/negate/negate.d.ts
/**
* Returns a new function that negates the result of the input function.
* @param func The input function to negate.
* @returns A new function that negates the result of the input function.
* @example
* ```ts
* const isEven = (num: number) => num % 2 === 0;
* const isOdd = negate(isEven);
* isOdd(1); // true
* isOdd(2); // false
* ```
*/
declare function negate<Func extends AnyFunction<boolean>>(func: Func): (...args: Parameters<Func>) => boolean;
//#endregion
export { negate as t };
//# sourceMappingURL=negate-DYNf3KMe.d.cts.map