add array destructure overload for _.zipWith

This commit is contained in:
andy.patterson
2017-12-12 08:34:35 -05:00
parent 405c41285d
commit 8aa84402f7
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -3954,6 +3954,10 @@ declare namespace _ {
arrays3: List<T> | null | undefined,
arrays4: List<T> | null | undefined,
arrays5: List<T> | null | undefined,
iteratee: (value1: T, value2: T, value3: T, value4: T, value5: T) => TResult
): TResult[];
zipWith<T, TResult>(
...iteratee: Array<((...group: T[]) => TResult) | List<T> | null | undefined>
): TResult[];
}
+3
View File
@@ -3513,6 +3513,9 @@ namespace TestZipWith {
return 1;
});
let mat = [[1, 2], [1, 2], [1, 2]];
result = _.zipWith(...mat, (...group: number[]) => 1);
result = _([1, 2]).zipWith((value1) => {
value1; // $ExpectType number
return 1;