Installation
npm install --save @types/js-worker-search
Summary
This package contains type definitions for js-worker-search (https://github.com/bvaughn/js-worker-search).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/js-worker-search.
index.d.ts
export enum INDEX_MODES {
ALL_SUBSTRINGS = "ALL_SUBSTRINGS",
EXACT_WORDS = "EXACT_WORDS",
PREFIXES = "PREFIXES",
}
export default class SearchApi {
constructor(someParam?: {
indexMode?: INDEX_MODES | undefined;
tokenizePattern?: RegExp | undefined;
caseSensitive?: boolean | undefined;
matchAnyToken?: boolean | undefined;
});
indexDocument(uid: string, text: string): void;
search(query: string): Promise<string[]>;
terminate(): void;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Peter Balogh.