type-fns
Version:
A set of types, type checks, and type guards for simpler, safer, and easier to read code.
12 lines (11 loc) • 335 B
TypeScript
/**
* a wrapper that enables you to easily negate the result of a type check function
*
* for example:
* ```ts
* const withoutIds = objects.filter(withNot(hasUuid));
*
* const invalidOptions = objects.filter(withNot(isOfStatus));
* ```
*/
export declare const withNot: <T>(is: (args: T) => boolean) => ((args: T) => boolean);