import { TrieNode } from './TrieNode'; import { CompoundWordsMethod } from './walker'; export { CompoundWordsMethod, JOIN_SEPARATOR, WORD_SEPARATOR } from './walker'; export declare type Cost = number; export declare type MaxCost = Cost; export interface SuggestionResult { word: string; cost: Cost; } export declare type SuggestionIterator = Generator; export declare function suggest(root: TrieNode, word: string, maxNumSuggestions?: number, compoundMethod?: CompoundWordsMethod, numChanges?: number): SuggestionResult[]; export declare function genSuggestions(root: TrieNode, word: string, compoundMethod?: CompoundWordsMethod): SuggestionIterator; export declare function genCompoundableSuggestions(root: TrieNode, word: string, compoundMethod: CompoundWordsMethod): SuggestionIterator; export declare function compSuggestionResults(a: SuggestionResult, b: SuggestionResult): number; export interface SuggestionCollector { collect: (src: SuggestionIterator) => void; add: (suggestion: SuggestionResult) => SuggestionCollector; readonly suggestions: SuggestionResult[]; readonly maxCost: number; readonly word: string; readonly maxNumSuggestions: number; } export declare function suggestionCollector(wordToMatch: string, maxNumSuggestions: number, filter?: (word: string) => boolean, changeLimit?: number): SuggestionCollector;