import Trie from './trie'; export interface FlashTextOpt { ignore?: boolean; } export interface BoundaryTestFn { test: (c: string) => boolean; } export declare type KeyWordObj = { [key: string]: string[]; }; export declare const KEYWORD = "__FlashText.js__"; export default class FlashText { private option; private readonly trie; private boundaries; private whitespaceChars; constructor(opt?: FlashTextOpt); get size(): number; get _trie(): Trie; setBoundaries(r: RegExp | BoundaryTestFn): this; setWhiteSpaceChars(c: string[]): this; addWhiteSpaceChars(c: string): this; addKeyWord(keyword: string, mapped?: string): void; addKeyWordsFromArray(keywords: string[], mapped?: string): void; addKeyWordsFromObject(obj?: KeyWordObj): void; removeKeyWord(keyword: string): boolean; removeKeyWordsFromArray(keywords: string[]): void; get(keyword: string): any; toMap(): any; extractKeywords(sentence: string): string | any[]; replaceKeyWords(sentence: string): string; clear(): void; } export declare const flashtext: FlashText;