File tree Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Expand file tree Collapse file tree 1 file changed +21
-4
lines changed Original file line number Diff line number Diff line change 1
1
export interface Formatter {
2
- format ( delta : Delta , original : any ) : string ;
2
+ format ( delta : Delta , original : any ) : string ;
3
+ }
4
+
5
+ export interface HtmlFormatter extends Formatter {
6
+ /**
7
+ * Set whether to show or hide unchanged parts of a diff.
8
+ * @param show Whether to show unchanged parts
9
+ * @param node The root element the diff is contained within. (Default: body)
10
+ * @param delay Transition time in ms. (Default: no transition)
11
+ */
12
+ showUnchanged ( show : boolean , node ?: Element | null , delay ?: number ) : void ;
13
+
14
+ /**
15
+ * An alias for showUnchanged(false, ...)
16
+ * @param node The root element the diff is contained within (Default: body)
17
+ * @param delay Transition time in ms. (Default: no transition)
18
+ */
19
+ hideUnchanged ( node ?: Element | null , delay ?: number ) : void ;
3
20
}
4
21
5
22
export interface Delta {
@@ -52,9 +69,9 @@ export class DiffPatcher {
52
69
}
53
70
54
71
export const formatters : {
55
- annotated : Formatter ;
56
- console : Formatter ;
57
- html : Formatter ;
72
+ annotated : Formatter ;
73
+ console : Formatter ;
74
+ html : HtmlFormatter ;
58
75
} ;
59
76
60
77
export const console : Formatter
You can’t perform that action at this time.
0 commit comments