版博士V2.0程序
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

1234567891011121314151617181920
  1. declare function diff(
  2. text1: string,
  3. text2: string,
  4. cursorPos?: number | diff.CursorInfo
  5. ): diff.Diff[];
  6. declare namespace diff {
  7. type Diff = [-1 | 0 | 1, string];
  8. const DELETE: -1;
  9. const INSERT: 1;
  10. const EQUAL: 0;
  11. interface CursorInfo {
  12. oldRange: { index: number; length: number };
  13. newRange: { index: number; length: number };
  14. }
  15. }
  16. export = diff;