1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-02 18:33:17 +02:00

fix: Include missing CreateOptions

This commit is contained in:
Rik
2019-06-07 13:45:07 +01:00
committed by GitHub
parent 471878d7d7
commit be8a9c496d

4
index.d.ts vendored
View File

@@ -5,6 +5,8 @@ declare module "flexsearch" {
readonly index: string;
readonly length: number;
init();
init(options: CreateOptions);
add(id: number, o: T);
search(query: string, options: number | SearchOptions, callback: (results: SearchResults<T>) => void): void;
search(query: string, options?: number | SearchOptions): Promise<SearchResults<T>>;
@@ -74,7 +76,7 @@ declare module "flexsearch" {
type Cursor = string;
export default class FlexSearch {
static create(options?: Options): Index;
static create(options?: CreateOptions): Index;
static registerMatcher(matcher: Matcher);
static registerEncoder(name: string, encoder: EncoderFn);
static registerLanguage(lang: string, options: { stemmer?: Stemmer; filter?: string[] });