From 6f095518bed68d08d66d5ffc2d6916ee6de0a658 Mon Sep 17 00:00:00 2001 From: tkqubo Date: Tue, 13 Oct 2015 21:28:24 +0900 Subject: [PATCH] fix: make arity optional for default curry | curryRight invocation --- lodash/lodash.d.ts | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 97ccc702d5..d5b67104bf 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6174,17 +6174,6 @@ declare module _ { //_.curry interface LoDashStatic { - /** - * Creates a function that accepts one or more arguments of func that when called either invokes func returning - * its result, if all func arguments have been provided, or returns a function that accepts one or more of the - * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. - * @param func The function to curry. - * @param arity The arity of func. - * @return Returns the new curried function. - */ - curry( - func: Function, - arity: number): TResult; /** * Creates a function that accepts one or more arguments of func that when called either invokes func returning * its result, if all func arguments have been provided, or returns a function that accepts one or more of the @@ -6230,6 +6219,17 @@ declare module _ { */ curry(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): CurriedFunction5; + /** + * Creates a function that accepts one or more arguments of func that when called either invokes func returning + * its result, if all func arguments have been provided, or returns a function that accepts one or more of the + * remaining func arguments, and so on. The arity of func may be specified if func.length is not sufficient. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curry( + func: Function, + arity?: number): TResult; } interface CurriedFunction1 { @@ -6276,16 +6276,6 @@ declare module _ { //_.curryRight interface LoDashStatic { - /** - * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight - * instead of _.partial. - * @param func The function to curry. - * @param arity The arity of func. - * @return Returns the new curried function. - */ - curryRight( - func: Function, - arity: number): TResult; /** * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight * instead of _.partial. @@ -6326,6 +6316,16 @@ declare module _ { */ curryRight(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R): CurriedFunction5; + /** + * This method is like _.curry except that arguments are applied to func in the manner of _.partialRight + * instead of _.partial. + * @param func The function to curry. + * @param arity The arity of func. + * @return Returns the new curried function. + */ + curryRight( + func: Function, + arity?: number): TResult; } interface LoDashObjectWrapper {