Skip to content

Commit 2b4d939

Browse files
authored
Merge pull request #270 from ilyaryabchinski/html-formatter-typings
add methods for hiding and showing unchanged fields to types
2 parents 55cf95d + 4efc61b commit 2b4d939

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/index.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ export interface Formatter {
22
format(delta: Delta, original: any): string;
33
}
44

5+
export interface HTMLFormatter extends Formatter {
6+
showUnchanged(): void;
7+
hideUnchanged(): void;
8+
}
9+
510
export interface Delta {
611
[key: string]: any;
712
[key: number]: any;
@@ -56,7 +61,7 @@ export const create: (options?: any) => DiffPatcher
5661
export const formatters: {
5762
annotated: Formatter;
5863
console: Formatter;
59-
html: Formatter;
64+
html: HTMLFormatter;
6065
};
6166

6267
export const console: Formatter

0 commit comments

Comments
 (0)