mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-09-03 02:42:53 +02:00
fix: Include missing CreateOptions
This commit is contained in:
4
index.d.ts
vendored
4
index.d.ts
vendored
@@ -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[] });
|
||||||
|
Reference in New Issue
Block a user