Skip to content

Commit 4efc61b

Browse files
add methods for hiding and showing unchanged fields to types
1 parent 0c4323e commit 4efc61b

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;
@@ -54,7 +59,7 @@ export class DiffPatcher {
5459
export const formatters: {
5560
annotated: Formatter;
5661
console: Formatter;
57-
html: Formatter;
62+
html: HTMLFormatter;
5863
};
5964

6065
export const console: Formatter

0 commit comments

Comments
 (0)