mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-01 19:45:48 +08:00
Merge pull request #19251 from PriceSpider-NeuIntel/master
Added missing options for diffChars and diffWords
This commit is contained in:
18
types/diff/index.d.ts
vendored
18
types/diff/index.d.ts
vendored
@@ -8,6 +8,15 @@ export = JsDiff;
|
||||
export as namespace JsDiff;
|
||||
|
||||
declare namespace JsDiff {
|
||||
interface ICaseOptions {
|
||||
ignoreCase: boolean;
|
||||
}
|
||||
|
||||
interface ILinesOptions {
|
||||
ignoreWhitespace?: boolean;
|
||||
newlineIsToken?: boolean;
|
||||
}
|
||||
|
||||
interface IDiffResult {
|
||||
value: string;
|
||||
count?: number;
|
||||
@@ -54,18 +63,15 @@ declare namespace JsDiff {
|
||||
tokenize(value: string): any; // return types are string or string[]
|
||||
}
|
||||
|
||||
function diffChars(oldStr: string, newStr: string): IDiffResult[];
|
||||
function diffChars(oldStr: string, newStr: string, options?: ICaseOptions): IDiffResult[];
|
||||
|
||||
function diffWords(oldStr: string, newStr: string): IDiffResult[];
|
||||
function diffWords(oldStr: string, newStr: string, options?: ICaseOptions): IDiffResult[];
|
||||
|
||||
function diffWordsWithSpace(oldStr: string, newStr: string): IDiffResult[];
|
||||
|
||||
function diffJson(oldObj: object, newObj: object): IDiffResult[];
|
||||
|
||||
function diffLines(oldStr: string, newStr: string, options?: {
|
||||
ignoreWhitespace?: boolean,
|
||||
newlineIsToken?: boolean,
|
||||
}): IDiffResult[];
|
||||
function diffLines(oldStr: string, newStr: string, options?: ILinesOptions): IDiffResult[];
|
||||
|
||||
function diffCss(oldStr: string, newStr: string): IDiffResult[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user