Installation
npm install --save @types/autosuggest-trie
Summary
This package contains type definitions for autosuggest-trie (https://github.com/moroshko/autosuggest-trie#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/autosuggest-trie.
declare function createTrie<T extends object>(
items: T[],
textKey: keyof T,
options?: TrieOptions<T>,
): Trie<T>;
interface Trie<T> {
getMatches(query: string, options?: MatchOptions): T[];
}
interface TrieOptions<T> {
comparator?: (a: T, b: T) => number;
splitRegex?: RegExp;
}
interface MatchOptions {
limit?: number;
splitRegex?: RegExp;
}
export = createTrie;
Additional Details
- Last updated: Mon, 06 Nov 2023 22:41:04 GMT
- Dependencies: none
Credits
These definitions were written by Hemand.