Fix chain methods to return the correct types

reduce, inject, foldl, reduceRight, and foldr should return _ChainSingle<TResult>
map and collect should return _Chain<TResult>
This commit is contained in:
dcrusader
2015-01-15 09:20:03 -08:00
parent b325840488
commit bac586a7f6
+7 -7
View File
@@ -2458,39 +2458,39 @@ interface _Chain<T> {
/**
* @see _.map
**/
collect<TResult>(iterator: _.ListIterator<T, TResult>, context?: any): _Chain<T>;
collect<TResult>(iterator: _.ListIterator<T, TResult>, context?: any): _Chain<TResult>;
/**
* @see _.map
**/
collect<TResult>(iterator: _.ObjectIterator<T, TResult>, context?: any): _Chain<T>;
collect<TResult>(iterator: _.ObjectIterator<T, TResult>, context?: any): _Chain<TResult>;
/**
* Wrapped type `any[]`.
* @see _.reduce
**/
reduce<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _Chain<T>;
reduce<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _ChainSingle<TResult>;
/**
* @see _.reduce
**/
inject<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _Chain<T>;
inject<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _ChainSingle<TResult>;
/**
* @see _.reduce
**/
foldl<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _Chain<T>;
foldl<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _ChainSingle<TResult>;
/**
* Wrapped type `any[]`.
* @see _.reduceRight
**/
reduceRight<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _Chain<T>;
reduceRight<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _ChainSingle<TResult>;
/**
* @see _.reduceRight
**/
foldr<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _Chain<T>;
foldr<TResult>(iterator: _.MemoIterator<T, TResult>, memo?: TResult, context?: any): _ChainSingle<TResult>;
/**
* Wrapped type `any[]`.