Skip to content

TrieNode

TrieNode<S, V> = object

Defined in: packages/data/src/trie/trie.ts:6

A node of a Trie. Mutable: the trie owns every field.

S

V

readonly children: Map<S, TrieNode<S, V>>

Defined in: packages/data/src/trie/trie.ts:8

Keyed by segment; SameValueZero, native Map semantics.


readonly parent: TrieNode<S, V> | null

Defined in: packages/data/src/trie/trie.ts:12


readonly segment: S | undefined

Defined in: packages/data/src/trie/trie.ts:14

The segment that reaches this node from its parent.


terminal: boolean

Defined in: packages/data/src/trie/trie.ts:10

Separate from value so that undefined is a storable value.


value: V | undefined

Defined in: packages/data/src/trie/trie.ts:11