mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Rename constants to match library
This commit is contained in:
@@ -9,8 +9,8 @@ diffs.forEach((diff: fastDiff.Diff) => {
|
||||
const text: string = diff[1];
|
||||
|
||||
switch (diff[0]) {
|
||||
case fastDiff.DIFF_EQUAL: break;
|
||||
case fastDiff.DIFF_DELETE: break;
|
||||
case fastDiff.DIFF_INSERT: break;
|
||||
case fastDiff.EQUAL: break;
|
||||
case fastDiff.DELETE: break;
|
||||
case fastDiff.INSERT: break;
|
||||
}
|
||||
});
|
||||
|
||||
6
types/fast-diff/index.d.ts
vendored
6
types/fast-diff/index.d.ts
vendored
@@ -8,9 +8,9 @@ declare function diff(text1: string, text2: string, cursorPos?: number): diff.Di
|
||||
declare namespace diff {
|
||||
type Diff = [-1 | 0 | 1, string];
|
||||
|
||||
const DIFF_DELETE: -1;
|
||||
const DIFF_INSERT: 1;
|
||||
const DIFF_EQUAL: 0;
|
||||
const DELETE: -1;
|
||||
const INSERT: 1;
|
||||
const EQUAL: 0;
|
||||
}
|
||||
|
||||
export = diff;
|
||||
|
||||
Reference in New Issue
Block a user