Rename constants to match library

This commit is contained in:
John Renner
2017-07-19 17:31:33 -07:00
parent 2a92293a59
commit 5d761ccef7
2 changed files with 6 additions and 6 deletions

View File

@@ -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;
}
});

View File

@@ -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;