You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
399 B
22 lines
399 B
1 month ago
|
declare function diff(
|
||
|
text1: string,
|
||
|
text2: string,
|
||
|
cursorPos?: number | diff.CursorInfo,
|
||
|
cleanup?: boolean
|
||
|
): diff.Diff[];
|
||
|
|
||
|
declare namespace diff {
|
||
|
type Diff = [-1 | 0 | 1, string];
|
||
|
|
||
|
const DELETE: -1;
|
||
|
const INSERT: 1;
|
||
|
const EQUAL: 0;
|
||
|
|
||
|
interface CursorInfo {
|
||
|
oldRange: { index: number; length: number };
|
||
|
newRange: { index: number; length: number };
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export = diff;
|