Skip to content
PACKAGES

assertReactiveCollectionChangeFrame()

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

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

The narrowed, validated value.

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

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