mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
TypeScript definitions for fuzzyset library (#15860)
* pdf def file * fuzzyset * fuzzyset * fuzzyset * dtslint * dtslint * dtslint * fuzzyset renamed to fuzzyset.js * fuzzyset ok$ * fuzzyset ok
This commit is contained in:
parent
a15b6bf327
commit
abdfe2a6aa
10
types/fuzzyset/fuzzyset-tests.ts
Normal file
10
types/fuzzyset/fuzzyset-tests.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import FuzzySet = require('fuzzyset');
|
||||
|
||||
const fuzzyset: FuzzySet = FuzzySet(['coucou', 'foo', 'bar', 'toto']);
|
||||
const results = fuzzyset.get('foo');
|
||||
|
||||
fuzzyset.length();
|
||||
|
||||
fuzzyset.isEmpty();
|
||||
|
||||
fuzzyset.values();
|
||||
17
types/fuzzyset/index.d.ts
vendored
Normal file
17
types/fuzzyset/index.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
// Type definitions for fuzzset 1.0
|
||||
// Project: https://github.com/washt/fuzzyset
|
||||
// Definitions by: Louis Grignon <https://github.com/lgrignon>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
interface FuzzySet {
|
||||
get(candidate: string): Array<[number, string]>;
|
||||
add(value: string): boolean;
|
||||
length(): number;
|
||||
isEmpty(): boolean;
|
||||
values(): string[];
|
||||
}
|
||||
|
||||
declare function FuzzySet(source: string[], useLevenshtein?: boolean, gramSizeLower?: number, gramSizeUpper?: number): FuzzySet;
|
||||
|
||||
export = FuzzySet;
|
||||
export as namespace FuzzySet;
|
||||
22
types/fuzzyset/tsconfig.json
Normal file
22
types/fuzzyset/tsconfig.json
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"fuzzyset-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/fuzzyset/tslint.json
Normal file
1
types/fuzzyset/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user