Skip to content

Commit

Permalink
types: Allow sending in undefined as the object
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Nov 1, 2019
1 parent 0efd03e commit c5ee897
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Expand Up @@ -22,11 +22,11 @@ declare const dotProp: {
```
*/
get<T>(
object: {[key: string]: any},
object: {[key: string]: any} | undefined,
path: string
): T | undefined;
get<T>(
object: {[key: string]: any},
object: {[key: string]: any} | undefined,
path: string,
defaultValue: T
): T;
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit c5ee897

Please sign in to comment.