index.d.ts 417 B

123456789101112131415161718192021
  1. declare const leven: {
  2. /**
  3. Measure the difference between two strings.
  4. @example
  5. ```
  6. import leven = require('leven');
  7. leven('cat', 'cow');
  8. //=> 2
  9. ```
  10. */
  11. (left: string, right: string): number;
  12. // TODO: Remove this for the next major release, refactor the whole definition to:
  13. // declare function leven(left: string, right: string): number;
  14. // export = leven;
  15. default: typeof leven;
  16. };
  17. export = leven;