Skip to content
PACKAGES

dictKv()

Create an in-memory typed KV tier preloaded from a record.

import { dictKv } from "@graphrefly/ts/storage";
function dictKv(
entries: Record<string, T> = {},
codec: Codec<T> = jsonCodecFor<T>(),
): KvStorageTier<T>
ParameterTypeDescription
entriesRecord<string, T>entries value used by the helper.
codecCodec<T>Codec used to encode and decode stored values.

A KvStorageTier<T> value.

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

packages/ts/src/storage/kv.ts