Skip to content

Commit

Permalink
Update TypeScript types to go along with #168
Browse files Browse the repository at this point in the history
  • Loading branch information
TehShrike committed Oct 22, 2019
1 parent d7fe2d3 commit dacb4bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ declare namespace deepmerge {
arrayMerge?(target: any[], source: any[], options?: Options): any[];
clone?: boolean;
customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined;
isMergeableObject?(value: object): boolean;
isMergeable?(value: object): boolean;
}

export function all (objects: object[], options?: Options): object;
Expand Down
6 changes: 3 additions & 3 deletions test/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ merged3.wat;

const options1: merge.Options = {
clone: true,
isMergeableObject (obj) {
isMergeable (obj) {
return false;
},
};
Expand All @@ -40,12 +40,12 @@ const options2: merge.Options = {
arrayMerge (target, source, options) {
target.length;
source.length;
options.isMergeableObject(target);
options.isMergeable(target);

return [];
},
clone: true,
isMergeableObject (obj) {
isMergeable (obj) {
return false;
},
};
Expand Down

0 comments on commit dacb4bc

Please sign in to comment.