Skip to content

serializeSnapshotSetJson<T>(set): SerializedSnapshotSet<T>

Defined in: packages/snapshot-set/src/serialization/json.ts:71

Capture a SnapshotSet as a SerializedSnapshotSet. O(k + m) time and space, where k is the number of registered values and m is the total number of effective mutations recorded across their histories — a direct dump of what is already stored, no search involved.

Every registered value is captured, including ones currently absent, and every minted snapshot id is captured, so a restored structure answers has, hasAt, values, and valuesAt identically to the original — including for ids the caller already held before calling serializeSnapshotSetJson.

T

SnapshotSet<T>

SerializedSnapshotSet<T>