From 8aa84402f7783d4abb7641e18cf81f9a1fb601cf Mon Sep 17 00:00:00 2001 From: "andy.patterson" Date: Tue, 12 Dec 2017 08:34:35 -0500 Subject: [PATCH] add array destructure overload for _.zipWith --- types/lodash/index.d.ts | 4 ++++ types/lodash/lodash-tests.ts | 3 +++ 2 files changed, 7 insertions(+) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index f038846d22..2a53dc0554 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -3954,6 +3954,10 @@ declare namespace _ { arrays3: List | null | undefined, arrays4: List | null | undefined, arrays5: List | null | undefined, + iteratee: (value1: T, value2: T, value3: T, value4: T, value5: T) => TResult + ): TResult[]; + + zipWith( ...iteratee: Array<((...group: T[]) => TResult) | List | null | undefined> ): TResult[]; } diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index e40569204d..2ba0ac8183 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -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;