[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.
This commit is contained in:
Nathan Bruer
2018-06-12 11:18:46 -07:00
committed by GitHub
parent 3670973099
commit 2dfb80b7d4
+1 -1
View File
@@ -3,7 +3,7 @@
// Definitions by: Sean Kelley <https://github.com/seansfkelley>
// 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 { }