GraphReFlyTS

API Reference

assertReactiveCollectionChangeFrame()

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

Import

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

Signature

function assertReactiveCollectionChangeFrame(
	value: unknown,
	expectedKind: K,
): ReactiveCollectionChangeFrame<K, C>

Parameters

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

Returns

The narrowed, validated value.

Example

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

Source

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