diff --git a/types/lodash/index.d.ts b/types/lodash/index.d.ts index 3143cdc0b4..0905728436 100644 --- a/types/lodash/index.d.ts +++ b/types/lodash/index.d.ts @@ -13908,10 +13908,15 @@ declare namespace _ { * _.pick(object, ['a', 'c']); * // => { 'a': 1, 'c': 3 } */ - pick( + pick( + object: T | null | undefined, + ...props: Array> + ): Pick; + + pick( object: T | null | undefined, ...props: PropertyPath[] - ): PartialObject; + ): PartialDeep; } interface LoDashImplicitWrapper { diff --git a/types/lodash/lodash-tests.ts b/types/lodash/lodash-tests.ts index 1977626262..827dde0c3e 100644 --- a/types/lodash/lodash-tests.ts +++ b/types/lodash/lodash-tests.ts @@ -11187,6 +11187,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>;