// Type definitions for MiniSearch declare class MiniSearch { constructor(options: Options); documentCount: number; add(document: T): void; addAll(documents: T[]): void; addAllAsync(documents: T[], options?: { chunkSize?: number }): Promise; autoSuggest(query: string, options?: SearchOptions): Suggestion[]; remove(document: T): void; removeAll(documents?: T[]): void; search(query: string, options?: SearchOptions): SearchResult[]; toJSON(): object; static getDefault(optionName: string): any; static loadJSON(json: string, options: Options): MiniSearch; } export declare interface SearchOptions { fields?: string[], filter?: (result: SearchResult) => boolean, boost?: { [fieldName: string]: number }, prefix?: boolean | ((term: string, index: number, terms: string[]) => boolean), fuzzy?: boolean | number | ((term: string, index: number, terms: string[]) => boolean | number), combineWith?: string, extractField?: (document: T, fieldName: string) => string, tokenize?: (text: string) => string[], processTerm?: (term: string) => string | null | undefined | false } export declare interface Options { fields: string[], storeFields?: string[], idField?: string, extractField?: (document: T, fieldName: string) => string, tokenize?: (text: string, fieldName: string) => string[], processTerm?: (term: string, fieldName: string) => string | null | undefined | false, searchOptions?: SearchOptions } export declare interface Suggestion { suggestion: string, score: number } export declare interface MatchInfo { [term: string]: string[] } export declare interface SearchResult { id: any, score: number, match: MatchInfo, [key: string]: any } export default MiniSearch