From 9c04d194944fe34e78ecdf025fdf23cc3776ad02 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 30 Oct 2017 22:16:24 -0400 Subject: [PATCH] remove extra overloads for _.pick --- types/lodash/index.d.ts | 19 ++----------------- types/lodash/lodash-tests.ts | 6 ++++++ 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 1da7b79201..0d65a0dfaa 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -13910,28 +13910,13 @@ declare namespace _ { */ pick( object: T | null | undefined, - ...props: U[] - ): Pick; - - pick( - object: T | null | undefined, - props: U[] + ...props: Array> ): Pick; - pick( - object: T | null | undefined, - props: PropertyPath[] - ): PartialObject; - pick( object: T | null | undefined, ...props: PropertyPath[] - ): PartialObject; - - pick( - object: T | null | undefined, - ...props: PropertyPath[] - ): Pick; + ): PartialDeep; } interface LoDashImplicitWrapper { diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index c7fb313dec..2c04cacfce 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -11183,6 +11183,12 @@ namespace TestPick { result = _.pick(obj, ['b', 1], 0, 'a'); } + { + let result: Pick; + result = _.pick(obj, 'a', 'b'); + result = _.pick(obj, ['a', 'b']); + } + { let result: _.LoDashImplicitWrapper>;