Skip to content
PACKAGES

assertReactiveCollectionSnapshotFrame()

Validate a D161 snapshot frame and reject non-strict-JSON payloads honestly.

import { assertReactiveCollectionSnapshotFrame } from "@graphrefly/ts/storage";
function assertReactiveCollectionSnapshotFrame(
value: unknown,
expectedKind: K,
): ReactiveCollectionSnapshotFrame<K, S>
ParameterTypeDescription
valueunknownUnknown value to check or decode.
expectedKindKexpected kind value used by the helper.

The narrowed, validated value.

import { assertReactiveCollectionSnapshotFrame } from "@graphrefly/ts/storage";

packages/ts/src/storage/reactive-collection.ts