From 4efc61b3f0b7276f4216d7626ae210e7409dfded Mon Sep 17 00:00:00 2001 From: Ilya Ryabchinski Date: Wed, 4 Sep 2019 10:26:48 +0300 Subject: [PATCH] add methods for hiding and showing unchanged fields to types --- src/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.d.ts b/src/index.d.ts index d580f95f..38d01c81 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -2,6 +2,11 @@ export interface Formatter { format(delta: Delta, original: any): string; } +export interface HTMLFormatter extends Formatter { + showUnchanged(): void; + hideUnchanged(): void; +} + export interface Delta { [key: string]: any; [key: number]: any; @@ -54,7 +59,7 @@ export class DiffPatcher { export const formatters: { annotated: Formatter; console: Formatter; - html: Formatter; + html: HTMLFormatter; }; export const console: Formatter