From 2dfb80b7d44b3932dcbb1a973b67ecff4fafd0a9 Mon Sep 17 00:00:00 2001 From: Nathan Bruer Date: Tue, 12 Jun 2018 11:18:46 -0700 Subject: [PATCH 1/2] [shallowequal] Compare callback allow undefined https://github.com/dashed/shallowequal/blob/master/README.md explicit states that the callback may return undefined (void 0) if the user wishes to use the default compare. --- types/shallowequal/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/shallowequal/index.d.ts b/types/shallowequal/index.d.ts index 29ffdab8f6..07d54d2b7f 100644 --- a/types/shallowequal/index.d.ts +++ b/types/shallowequal/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Sean Kelley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare function shallowEqual(objA: any, objB: any, compare?: (objA: any, objB: any, indexOrKey?: number | string) => boolean, compareContext?: any): boolean; +declare function shallowEqual(objA: any, objB: any, compare?: (objA: any, objB: any, indexOrKey?: number | string) => boolean | undefined, compareContext?: any): boolean; declare namespace shallowEqual { } From c406d22646f33a7f950bafd662e852d85a0a0f93 Mon Sep 17 00:00:00 2001 From: Nathan Bruer Date: Tue, 12 Jun 2018 11:20:58 -0700 Subject: [PATCH 2/2] parentheses --- types/shallowequal/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/shallowequal/index.d.ts b/types/shallowequal/index.d.ts index 07d54d2b7f..af13b55eb4 100644 --- a/types/shallowequal/index.d.ts +++ b/types/shallowequal/index.d.ts @@ -3,7 +3,7 @@ // Definitions by: Sean Kelley // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -declare function shallowEqual(objA: any, objB: any, compare?: (objA: any, objB: any, indexOrKey?: number | string) => boolean | undefined, compareContext?: any): boolean; +declare function shallowEqual(objA: any, objB: any, compare?: (objA: any, objB: any, indexOrKey?: number | string) => (boolean | undefined), compareContext?: any): boolean; declare namespace shallowEqual { }