MultiLoader-Template/node_modules/es-toolkit/dist/compat/function/negate.d.mts
3944Realms 768f38fc97 feat: 可使用的构建模板
修改了脚本,使其可以推给Maven仓库
2026-05-03 13:02:19 +08:00

19 lines
531 B
TypeScript

/**
* Creates a function that negates the result of the predicate function.
*
* @template T - The type of the arguments array.
* @param {(...args: T) => boolean} predicate - The predicate to negate.
* @returns {(...args: T) => boolean} 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;
export { negate };