UNPKG

566 BTypeScriptView Raw
1import { LodashMethodDecorator } from './factory';
2declare const decorator: (...args: any[]) => MethodDecorator & PropertyDecorator;
3/**
4 * Creates a function that invokes func, with up to n arguments, ignoring any additional arguments.
5 * @param {number} n The arity cap.
6 * @example
7 *
8 * class MyClass {
9 * @Ary(1)
10 * fn(...args) {
11 * return args;
12 * }
13 * }
14 *
15 * const myClass = new MyClass();
16 *
17 * myClass.fn(1, 2, 3, 4); // => [ 1 ]
18 */
19export declare function Ary(n: number): LodashMethodDecorator;
20export { Ary as ary };
21export default decorator;