cspell-trie-lib 9.2.1 → 9.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -25
- package/dist/index.js +199 -382
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -68,20 +68,12 @@ declare function editDistanceWeighted(wordA: string, wordB: string, weights: Wei
|
|
|
68
68
|
* @returns A Weighted Map to be used with distance calculations.
|
|
69
69
|
*/
|
|
70
70
|
declare function createWeightedMap(defs: SuggestionCostMapDef[]): WeightMap;
|
|
71
|
-
/**
|
|
72
|
-
* Update a WeightedMap with a WeightedMapDef
|
|
73
|
-
* @param weightedMap - map to update
|
|
74
|
-
* @param def - the definition to use
|
|
75
|
-
*/
|
|
76
71
|
//#endregion
|
|
77
72
|
//#region src/lib/types.d.ts
|
|
78
73
|
/**
|
|
79
74
|
* Make all properties in T optional and Possibly undefined
|
|
80
75
|
*/
|
|
81
76
|
type PartialWithUndefined<T> = { [P in keyof T]?: T[P] | undefined };
|
|
82
|
-
/**
|
|
83
|
-
* Make all fields mandatory
|
|
84
|
-
*/
|
|
85
77
|
//#endregion
|
|
86
78
|
//#region src/lib/ITrieNode/TrieInfo.d.ts
|
|
87
79
|
interface TrieInfo {
|
|
@@ -235,20 +227,12 @@ type WalkerIterator$1 = Generator<YieldResult$1, void, FalseToNotGoDeeper | unde
|
|
|
235
227
|
*/
|
|
236
228
|
type HintedWalkerIterator = Generator<YieldResult, void, Hinting | undefined>;
|
|
237
229
|
declare function hintedWalker(root: TrieRoot, ignoreCase: boolean, hint: string, compoundingMethod: CompoundWordsMethod | undefined, emitWordSeparator?: string): HintedWalkerIterator;
|
|
238
|
-
/**
|
|
239
|
-
* Walks the Trie and yields a value at each node.
|
|
240
|
-
* next(goDeeper: boolean):
|
|
241
|
-
*/
|
|
242
|
-
|
|
243
230
|
interface Hinting {
|
|
244
231
|
goDeeper: boolean;
|
|
245
232
|
}
|
|
246
233
|
//#endregion
|
|
247
234
|
//#region src/lib/walker/walker.d.ts
|
|
248
235
|
declare function walker(root: TrieNode, compoundingMethod?: CompoundWordsMethod): WalkerIterator;
|
|
249
|
-
/**
|
|
250
|
-
* Walks the Trie and yields each word.
|
|
251
|
-
*/
|
|
252
236
|
//#endregion
|
|
253
237
|
//#region src/lib/suggestions/genSuggestionsOptions.d.ts
|
|
254
238
|
interface GenSuggestionOptionsStrict {
|
|
@@ -856,15 +840,6 @@ declare const normalizeWordForCaseInsensitive: (text: string) => string[];
|
|
|
856
840
|
* @param rangeChar - the character to indicate ranges, set to empty to not have ranges.
|
|
857
841
|
*/
|
|
858
842
|
declare function expandCharacterSet(line: string, rangeChar?: string): Set<string>;
|
|
859
|
-
/**
|
|
860
|
-
* Expands a range between two characters.
|
|
861
|
-
* - `a <= b` -- `[a, b]`
|
|
862
|
-
* - `a > b` -- `[]`
|
|
863
|
-
* @param a - staring character
|
|
864
|
-
* @param b - ending character
|
|
865
|
-
* @returns array of unicode characters.
|
|
866
|
-
*/
|
|
867
|
-
|
|
868
843
|
//#endregion
|
|
869
844
|
export { CASE_INSENSITIVE_PREFIX, COMPOUND_FIX, ChildMap, CompoundWordsMethod, ExportOptions, FLAG_WORD, FORBID_PREFIX, FindFullResult, FindWordOptions, HintedWalkerIterator, Hinting, ITrie, JOIN_SEPARATOR, MaxCost, OPTIONAL_COMPOUND_FIX, type PartialTrieOptions, SuggestionCollector, type SuggestionCostMapDef, SuggestionResult, Trie, TrieBuilder, TrieNode, type TrieOptions, type TrieOptionsRO, TrieRoot, WORD_SEPARATOR, WalkerIterator, WeightMap, YieldResult, buildITrieFromWords, buildTrie, buildTrieFast, consolidate, countNodes, countWords, createDictionaryLineParserMapper as createDictionaryLineParser, createTrieRoot, createTrieRootFromList, createWeightedMap, decodeTrie, defaultTrieInfo, defaultTrieInfo as defaultTrieOptions, editDistance, editDistanceWeighted, expandCharacterSet, findNode, has, hintedWalker, impersonateCollector, importTrie, insert, isCircular, isDefined, isWordTerminationNode, iterateTrie, iteratorTrieWords, mapDictionaryInformationToWeightMap, mergeDefaults, mergeOptionalWithDefaults, normalizeWord, normalizeWordForCaseInsensitive, normalizeWordToLowercase, orderTrie, parseDictionary, parseDictionaryLegacy, parseDictionaryLines, serializeTrie, suggestionCollector, trieNodeToRoot, walk, walker };
|
|
870
845
|
//# sourceMappingURL=index.d.ts.map
|