From b3258404880f84a842a2a5913dfb5c2233a8d715 Mon Sep 17 00:00:00 2001 From: dcrusader Date: Wed, 14 Jan 2015 16:33:38 -0800 Subject: [PATCH 1/2] Fix concat to receive a splat of arrays --- underscore/underscore.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index f50488b66..903835e2f 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -3253,7 +3253,7 @@ interface _Chain { * @param arr Arrays and/or values to concatenate into a new array. See the discussion below for details. * @return A new array comprised of the array on which it is called **/ - concat(...arr: Array): _Chain; + concat(...arr: Array): _Chain; /** * Join all elements of an array into a string. From bac586a7f678aa03820fb09d0552f4c05030147b Mon Sep 17 00:00:00 2001 From: dcrusader Date: Thu, 15 Jan 2015 09:20:03 -0800 Subject: [PATCH 2/2] Fix chain methods to return the correct types reduce, inject, foldl, reduceRight, and foldr should return _ChainSingle map and collect should return _Chain --- underscore/underscore.d.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/underscore/underscore.d.ts b/underscore/underscore.d.ts index 903835e2f..8cf92df12 100644 --- a/underscore/underscore.d.ts +++ b/underscore/underscore.d.ts @@ -2458,39 +2458,39 @@ interface _Chain { /** * @see _.map **/ - collect(iterator: _.ListIterator, context?: any): _Chain; + collect(iterator: _.ListIterator, context?: any): _Chain; /** * @see _.map **/ - collect(iterator: _.ObjectIterator, context?: any): _Chain; + collect(iterator: _.ObjectIterator, context?: any): _Chain; /** * Wrapped type `any[]`. * @see _.reduce **/ - reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): _Chain; + reduce(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; /** * @see _.reduce **/ - inject(iterator: _.MemoIterator, memo?: TResult, context?: any): _Chain; + inject(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; /** * @see _.reduce **/ - foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): _Chain; + foldl(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; /** * Wrapped type `any[]`. * @see _.reduceRight **/ - reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): _Chain; + reduceRight(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; /** * @see _.reduceRight **/ - foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): _Chain; + foldr(iterator: _.MemoIterator, memo?: TResult, context?: any): _ChainSingle; /** * Wrapped type `any[]`.