From c5ee8975539c8ba4b3fb67dcc2edf51dc7e8c040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Thu, 31 Oct 2019 14:57:04 +0000 Subject: [PATCH] types: Allow sending in undefined as the object --- index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.d.ts b/index.d.ts index a969854..21b0545 100644 --- a/index.d.ts +++ b/index.d.ts @@ -22,11 +22,11 @@ declare const dotProp: { ``` */ get( - object: {[key: string]: any}, + object: {[key: string]: any} | undefined, path: string ): T | undefined; get( - object: {[key: string]: any}, + object: {[key: string]: any} | undefined, path: string, defaultValue: T ): T; @@ -72,7 +72,7 @@ declare const dotProp: { //=> true ``` */ - has(object: {[key: string]: any}, path: string): boolean; + has(object: {[key: string]: any} | undefined, path: string): boolean; /** @param object - Object to delete the `path` value.