@types/fuzzy-search
Version:
TypeScript definitions for fuzzy-search
39 lines (29 loc) • 1.17 kB
Markdown
# Installation
> `npm install --save @types/fuzzy-search`
# Summary
This package contains type definitions for fuzzy-search (https://github.com/wouter2203/fuzzy-search#readme).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fuzzy-search.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fuzzy-search/index.d.ts)
````ts
declare class FuzzySearch<T extends object | string> {
haystack: T[];
keys: string[];
options: Required<FuzzySearch.Options>;
static isMatch(item: string, query: string, caseSensitive: boolean): number;
constructor(haystack: readonly T[], keys?: readonly string[], options?: FuzzySearch.Options);
search(needle?: string): T[];
}
declare namespace FuzzySearch {
interface Options {
readonly caseSensitive?: boolean | undefined;
readonly sort?: boolean | undefined;
}
}
export = FuzzySearch;
````
### Additional Details
* Last updated: Thu, 23 Nov 2023 15:35:42 GMT
* Dependencies: none
# Credits
These definitions were written by [BendingBender](https://github.com/BendingBender).