UNPKG

651 BTypeScriptView Raw
1import { LodashMethodDecorator } from './factory';
2declare const decorator: (...args: any[]) => MethodDecorator & PropertyDecorator;
3/**
4 * Creates a function that invokes func with its arguments transformed.
5 * @export
6 * @param {...Function[]} transforms
7 * @returns {LodashMethodDecorator}
8 * @example
9 * class MyClass {
10 * @OverArgs(_.castArray)
11 * fn(list) {
12 * return list;
13 * }
14 * }
15 *
16 * const myClass = new MyClass();
17 *
18 * myClass.fn([ 1 ]); //=> [ 1 ];
19 * myClass.fn(1); //=> [ 1 ];
20 */
21export declare function OverArgs(...transforms: Function[]): LodashMethodDecorator;
22export { OverArgs as overArgs };
23export default decorator;