mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Update diff2html configuration options typings (#36629)
This commit is contained in:
parent
d314939efe
commit
6d07646a19
@ -1,11 +1,9 @@
|
||||
|
||||
import Diff2Html = require('diff2html');
|
||||
|
||||
let d2h = Diff2Html.Diff2Html;
|
||||
|
||||
class Diff2HtmlOptionsImpl implements Diff2Html.Options {
|
||||
constructor (public inputFormat: string) {
|
||||
}
|
||||
constructor(public inputFormat: 'diff' | 'json') {}
|
||||
}
|
||||
|
||||
let strInput =
|
||||
|
||||
14
types/diff2html/index.d.ts
vendored
14
types/diff2html/index.d.ts
vendored
@ -2,17 +2,22 @@
|
||||
// Project: https://github.com/rtfpessoa/diff2html
|
||||
// Definitions by: rtfpessoa <https://github.com/rtfpessoa>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.2
|
||||
|
||||
declare namespace Diff2Html {
|
||||
|
||||
export interface Options {
|
||||
inputFormat?: string;
|
||||
outputFormat?: string;
|
||||
inputFormat?: 'diff' | 'json';
|
||||
outputFormat?: 'line-by-line' | 'side-by-side';
|
||||
showFiles?: boolean;
|
||||
matching?: string;
|
||||
synchronisedScroll?: boolean;
|
||||
matching?: 'lines' | 'words' | 'none';
|
||||
matchWordsThreshold?: number;
|
||||
matchingMaxComparisons?: number;
|
||||
maxLineSizeInBlockForComparison?: number;
|
||||
maxLineLengthHighlight?: number;
|
||||
templates?: object;
|
||||
rawTemplates?: object;
|
||||
renderNothingWhenEmpty?: boolean;
|
||||
}
|
||||
|
||||
export interface Line {
|
||||
@ -57,7 +62,6 @@ declare namespace Diff2Html {
|
||||
export interface Diff2Html {
|
||||
getJsonFromDiff(input: string, configuration?: Options): Result[];
|
||||
getPrettyHtml(input: any, configuration?: Options): string;
|
||||
getPrettyHtmlFromJson(input: Result[], configuration?: Options): string;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user