Skip to content

Defined in: packages/trie/src/serialization/json.ts:26

A plain, inert description of a segmented trie: the implementation kind and every entry, in the iteration order entries() reports. It holds no behavior and no reference to the structure it came from, so it can be stored, compared, structurally cloned, or sent through postMessage. It survives JSON.stringify when the values themselves do.

kind identifies the storage layout to restore. Restoring replays the entries in order, so a round trip also preserves iteration order: replayed children land in each node’s Map exactly as the walk first found them.

V

readonly schemaVersion: 1

Defined in: packages/trie/src/serialization/json.ts:28

Wire-schema version.


readonly kind: "uncompressed" | "compressed"

Defined in: packages/trie/src/serialization/json.ts:30

The storage layout to restore when no factory override is supplied.


readonly entries: readonly SegmentedTrieEntry<V>[]

Defined in: packages/trie/src/serialization/json.ts:32

Every entry, in iteration order.