fix: make arity optional for default curry | curryRight invocation

This commit is contained in:
tkqubo
2015-10-13 21:34:54 +09:00
parent b337a759c2
commit 6f095518be
+21 -21
View File
@@ -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<TResult extends Function>(
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<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R):
CurriedFunction5<T1, T2, T3, T4, T5, R>;
/**
* 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<TResult extends Function>(
func: Function,
arity?: number): TResult;
}
interface CurriedFunction1<T1, R> {
@@ -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<TResult extends Function>(
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<T1, T2, T3, T4, T5, R>(func: (t1: T1, t2: T2, t3: T3, t4: T4, t5: T5) => R):
CurriedFunction5<T5, T4, T3, T2, T1, R>;
/**
* 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<TResult extends Function>(
func: Function,
arity?: number): TResult;
}
interface LoDashObjectWrapper<T> {