GraphReFlyTS

API Reference

assertReactiveCollectionSnapshotFrame()

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

Import

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

Signature

function assertReactiveCollectionSnapshotFrame(
	value: unknown,
	expectedKind: K,
): ReactiveCollectionSnapshotFrame<K, S>

Parameters

ParameterTypeDescription
valueunknownUnknown value to check or decode.
expectedKindKexpected kind value used by the helper.

Returns

The narrowed, validated value.

Example

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

Source

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