mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Fix get-value second argument typing not accepting arrays (#34244)
This commit is contained in:
@@ -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;
|
||||
|
||||
Vendored
+2
-1
@@ -1,13 +1,14 @@
|
||||
// Type definitions for get-value 3.0
|
||||
// Project: https://github.com/jonschlinkert/get-value
|
||||
// Definitions by: Daniel Rosenwasser <https://github.com/DanielRosenwasser>
|
||||
// Mathew Allen <https://github.com/TheMallen>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.4
|
||||
|
||||
export = get;
|
||||
|
||||
declare function get<T>(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 {
|
||||
|
||||
Reference in New Issue
Block a user