diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3a1c51f183..1674287339 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -1018,6 +1018,9 @@ result = _.isUndefined(void 0); result = _.keys({ 'one': 1, 'two': 2, 'three': 3 }); result = _({ 'one': 1, 'two': 2, 'three': 3 }).keys().value(); +result = _.keysIn({ 'one': 1, 'two': 2, 'three': 3 }); +result = _({ 'one': 1, 'two': 2, 'three': 3 }).keysIn().value(); + var mergeNames = { 'stooges': [ { 'name': 'moe' }, diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index fcf4685770..f8728e77e7 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -6003,6 +6003,23 @@ declare module _ { keys(): LoDashArrayWrapper } + //_.keysIn + interface LoDashStatic { + /** + * Creates an array of the own and inherited enumerable property names of object. + * @param object The object to query. + * @return An array of property names. + **/ + keysIn(object?: any): string[]; + } + + interface LoDashObjectWrapper { + /** + * @see _.keysIn + **/ + keysIn(): LoDashArrayWrapper + } + //_.mapValues interface LoDashStatic { /**