mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-13 12:37:16 +08:00
Merge pull request #10749 from rotev-ms/master
Adding missing method definitions to diff-match-patch
This commit is contained in:
13
diff-match-patch/diff-match-patch.d.ts
vendored
13
diff-match-patch/diff-match-patch.d.ts
vendored
@@ -5,6 +5,13 @@
|
||||
|
||||
declare module "diff-match-patch" {
|
||||
type Diff = [number, string];
|
||||
export class Patch {
|
||||
diffs: Diff[];
|
||||
start1: number;
|
||||
start2: number;
|
||||
length1: number;
|
||||
length2: number;
|
||||
}
|
||||
|
||||
export class diff_match_patch {
|
||||
static new (): diff_match_patch;
|
||||
@@ -31,6 +38,12 @@ declare module "diff-match-patch" {
|
||||
diff_levenshtein(diffs: Diff[]): number;
|
||||
diff_toDelta(diffs: Diff[]): string;
|
||||
diff_fromDelta(text1: string, delta: string): Diff[];
|
||||
|
||||
patch_make(text1: any, text2?: string): Patch[];
|
||||
patch_deepCopy(patches: Patch[]): Patch[];
|
||||
patch_apply(patches: Patch[], text: string): [string, boolean[]];
|
||||
patch_fromText(text: string): Patch[];
|
||||
patch_toText(patches: Patch[]): string;
|
||||
}
|
||||
|
||||
export var DIFF_DELETE: number;
|
||||
|
||||
Reference in New Issue
Block a user