GraphReFlyTS

API Reference

reactiveCollectionSnapshotFrame()

Build a D161 strict-JSON snapshot frame before validation/encoding.

Import

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

Signature

function reactiveCollectionSnapshotFrame(
	kind: K,
	snapshot: S,
	opts: { readonly changeCursor?: number } = {},
): ReactiveCollectionSnapshotFrame<K, S>

Parameters

ParameterTypeDescription
kindKkind value used by the helper.
snapshotSsnapshot value used by the helper.
opts{ readonly changeCursor?: number }Options that configure the helper.

Returns

A ReactiveCollectionSnapshotFrame<K, S> value.

Example

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

Source

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