import type { SuggestionCollector, SuggestionResult } from 'cspell-trie-lib'; import { CompoundWordsMethod, Trie } from 'cspell-trie-lib'; import { FindResult, HasOptions, SpellingDictionary, SpellingDictionaryOptions, SuggestOptions } from './SpellingDictionary'; export declare class SpellingDictionaryFromTrie implements SpellingDictionary { readonly trie: Trie; readonly name: string; readonly options: SpellingDictionaryOptions; readonly source: string; static readonly cachedWordsLimit = 50000; private _size; readonly knownWords: Set; readonly unknownWords: Set; readonly mapWord: (word: string) => string; readonly type = "SpellingDictionaryFromTrie"; readonly isDictionaryCaseSensitive: boolean; readonly containsNoSuggestWords: boolean; private weightMap; constructor(trie: Trie, name: string, options: SpellingDictionaryOptions, source?: string, size?: number); get size(): number; has(word: string, hasOptions?: HasOptions): boolean; find(word: string, hasOptions?: HasOptions): FindResult | undefined; private resolveOptions; private _find; private findAnyForm; private _findAnyForm; isNoSuggestWord(word: string, options?: HasOptions): boolean; isForbidden(word: string, _ignoreCaseAndAccents?: boolean): boolean; private _isForbidden; suggest(word: string, numSuggestions?: number, compoundMethod?: CompoundWordsMethod, numChanges?: number, ignoreCase?: boolean): SuggestionResult[]; suggest(word: string, suggestOptions: SuggestOptions): SuggestionResult[]; private _suggest; genSuggestions(collector: SuggestionCollector, suggestOptions: SuggestOptions): void; getErrors(): Error[]; } /** * Create a dictionary from a trie file. * @param data - contents of a trie file. * @param name - name of dictionary * @param source - filename or uri * @param options - options. * @returns SpellingDictionary */ export declare function createSpellingDictionaryFromTrieFile(data: Iterable | string, name: string, source: string, options: SpellingDictionaryOptions): SpellingDictionary; declare function outerWordForms(word: string, mapWord: (word: string) => string): Set; export declare const __testing__: { outerWordForms: typeof outerWordForms; }; export {}; //# sourceMappingURL=SpellingDictionaryFromTrie.d.ts.map