Skip to content

Commit 5c4cb8e

Browse files
authored
Merge pull request #231 from bomgar/master
update type definition
2 parents c7ab565 + 5c873c7 commit 5c4cb8e

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

src/index.d.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
export type Formatter = (delta: Delta, original: any) => string;
1+
export interface Formatter {
2+
format(delta: Delta, original: any): string;
3+
}
24

35
export interface Delta {
46
[key: string]: any;
@@ -43,14 +45,21 @@ export class DiffPatcher {
4345
constructor(options?: any);
4446

4547
clone: (value: any) => any;
46-
dateReviver: (key: string, value: any) => any;
4748
diff: (left: any, right: any) => Delta | undefined;
48-
formatters: {
49-
annotated: Formatter;
50-
console: Formatter;
51-
html: Formatter;
52-
};
5349
patch: (left: any, delta: Delta) => any;
5450
reverse: (delta: Delta) => Delta | undefined;
5551
unpatch: (right: any, delta: Delta) => any;
5652
}
53+
54+
export const formatters: {
55+
annotated: Formatter;
56+
console: Formatter;
57+
html: Formatter;
58+
};
59+
60+
export const console: Formatter
61+
62+
export const diff: (left: any, right: any) => Delta | undefined;
63+
export const patch: (left: any, delta: Delta) => any;
64+
export const reverse: (delta: Delta) => Delta | undefined;
65+
export const unpatch: (right: any, delta: Delta) => any;

0 commit comments

Comments
 (0)