Skip to content

Commit

Permalink
Merge pull request #270 from ilyaryabchinski/html-formatter-typings
Browse files Browse the repository at this point in the history
add methods for  hiding and showing unchanged fields to types
  • Loading branch information
benjamine authored Jan 1, 2020
2 parents 55cf95d + 4efc61b commit 2b4d939
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -56,7 +61,7 @@ export const create: (options?: any) => DiffPatcher
export const formatters: {
annotated: Formatter;
console: Formatter;
html: Formatter;
html: HTMLFormatter;
};

export const console: Formatter
Expand Down

0 comments on commit 2b4d939

Please # to comment.