Add types for fast-diff

This commit is contained in:
John Renner
2017-07-18 16:15:06 -07:00
parent d2bf223394
commit 2a92293a59
4 changed files with 55 additions and 0 deletions

16
types/fast-diff/index.d.ts vendored Normal file
View File

@@ -0,0 +1,16 @@
// Type definitions for fast-diff 1.1
// Project: https://github.com/jhchen/fast-diff#readme
// Definitions by: John Renner <https://github.com/djrenren>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function diff(text1: string, text2: string, cursorPos?: number): diff.Diff[];
declare namespace diff {
type Diff = [-1 | 0 | 1, string];
const DIFF_DELETE: -1;
const DIFF_INSERT: 1;
const DIFF_EQUAL: 0;
}
export = diff;