mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
added types for js-levenshtein
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
// Type definitions for js-levenshtein 1.1.6
|
||||
// Project: https://github.com/gustf/js-levenshtein
|
||||
// Definitions by: Kallu609 <https://github.com/Kallu609>
|
||||
// Pyry Rouvila <https://github.com/naftis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/**
|
||||
* Calculates Levenshtein distance between two strings
|
||||
*/
|
||||
declare function levenshtein(compareFrom: string, compareTo: string): number;
|
||||
|
||||
export default levenshtein;
|
||||
@@ -0,0 +1,9 @@
|
||||
// Type definitions for js-levenshtein 1.1.6
|
||||
// Project: https://github.com/gustf/js-levenshtein
|
||||
// Definitions by: Kallu609 <https://github.com/Kallu609>
|
||||
// Pyry Rouvila <https://github.com/naftis>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import levenshtein from 'js-levenshtein';
|
||||
|
||||
levenshtein('kittens', 'mittens'); // $ExpectType number
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": ["es6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": ["../"],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": ["index.d.ts", "js-levenshtein-tests.ts"]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user