1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-03 10:53:41 +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 index: string;
readonly length: number; readonly length: number;
init();
init(options: CreateOptions);
add(id: number, o: T); add(id: number, o: T);
search(query: string, options: number | SearchOptions, callback: (results: SearchResults<T>) => void): void; search(query: string, options: number | SearchOptions, callback: (results: SearchResults<T>) => void): void;
search(query: string, options?: number | SearchOptions): Promise<SearchResults<T>>; search(query: string, options?: number | SearchOptions): Promise<SearchResults<T>>;
@@ -74,7 +76,7 @@ declare module "flexsearch" {
type Cursor = string; type Cursor = string;
export default class FlexSearch { export default class FlexSearch {
static create(options?: Options): Index; static create(options?: CreateOptions): Index;
static registerMatcher(matcher: Matcher); static registerMatcher(matcher: Matcher);
static registerEncoder(name: string, encoder: EncoderFn); static registerEncoder(name: string, encoder: EncoderFn);
static registerLanguage(lang: string, options: { stemmer?: Stemmer; filter?: string[] }); static registerLanguage(lang: string, options: { stemmer?: Stemmer; filter?: string[] });