diff --git a/shallowequal/shallowequal-tests.ts b/shallowequal/shallowequal-tests.ts new file mode 100644 index 0000000000..73c644c770 --- /dev/null +++ b/shallowequal/shallowequal-tests.ts @@ -0,0 +1,12 @@ +/// + +import shallowEqual = require('shallowequal'); + +const a = {}, b = {}; +function compare(a: any, b: any, indexOrKey?: number | string) { + return false; +} + +shallowEqual(a, b); +shallowEqual(a, b, compare); +shallowEqual(a, b, compare, {}); diff --git a/shallowequal/shallowequal.d.ts b/shallowequal/shallowequal.d.ts new file mode 100644 index 0000000000..d3971e15c9 --- /dev/null +++ b/shallowequal/shallowequal.d.ts @@ -0,0 +1,9 @@ +// Type definitions for shallowequal v0.2.2 +// Project: https://github.com/dashed/shallowequal +// Definitions by: Sean Kelley +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'shallowequal' { + function shallowEqual(objA: any, objB: any, compare?: (objA: any, objB: any, indexOrKey?: number | string) => boolean, compareContext?: any): boolean; + export = shallowEqual; +}