uncompressedSegmentedTrie<
V>(entries?):SegmentedTrie<V>
Defined in: packages/trie/src/uncompressed-segmented-trie.ts:267
Create a SegmentedTrie backed by one node per distinct segment
prefix, each holding its children in a Map keyed by the next segment.
Shared key prefixes are stored once and looked up once, which is what turns
longest-prefix resolution into a single top-down walk. Prefer
compressedSegmentedTrie when keys are deep or mostly non-branching,
which is when packing segment runs into edge labels pays for its split
bookkeeping; prefer a plain Map<string, V> keyed on the joined string
when only exact matches are needed.
Type Parameters
Section titled “Type Parameters”V
Parameters
Section titled “Parameters”entries?
Section titled “entries?”Iterable<SegmentedTrieEntry<V>, any, any>
Key-value pairs to store, in iteration order. A repeated
key overwrites the earlier value, mirroring Map, and entries before an
invalid one stay stored.
Returns
Section titled “Returns”Throws
Section titled “Throws”When an entry key is not an array of strings.