diff --git a/types/get-value/get-value-tests.ts b/types/get-value/get-value-tests.ts index 9e7534e000..c6cf6c7de4 100644 --- a/types/get-value/get-value-tests.ts +++ b/types/get-value/get-value-tests.ts @@ -6,6 +6,9 @@ get(obj, "a"); get(obj, "a.b"); get(obj, "a.b.c"); get(obj, "a.b.c.d"); +get(obj, ['a']); +get(obj, ['a', 'b', 'c']); +get(obj, ['a', 'b', 'c', 'd']); { const isEnumerable = Object.prototype.propertyIsEnumerable; diff --git a/types/get-value/index.d.ts b/types/get-value/index.d.ts index 70cf0286e7..04dabe5101 100644 --- a/types/get-value/index.d.ts +++ b/types/get-value/index.d.ts @@ -1,13 +1,14 @@ // Type definitions for get-value 3.0 // Project: https://github.com/jonschlinkert/get-value // Definitions by: Daniel Rosenwasser +// Mathew Allen // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.4 export = get; declare function get(obj: T): T; -declare function get(obj: object, key: string, options?: get.Options): any; +declare function get(obj: object, key: string | string[], options?: get.Options): any; declare namespace get { interface Options {