UNPKG

583 BTypeScriptView Raw
1import { ResolvableFunction, BiTypedDecorator1 } from './factory';
2/**
3 * Negates a functions result or, when used on a property, creates a function that
4 * negates the result of a provided function.
5 * @param {ResolvableFunction} [fn] A resolvable function.
6 * @example
7 * class MyClass {
8 * @Negate('fn')
9 * fn2: () => boolean;
10 *
11 * fn(): boolean {
12 * return true;
13 * }
14 * }
15 *
16 * const myClass = new MyClass();
17 *
18 * myClass.fn2(); //=> false
19 */
20export declare const Negate: BiTypedDecorator1<ResolvableFunction>;
21export { Negate as negate };
22export default Negate;