API Reference
requireKvPutIfAbsent()
Require D85 conditional-create support and produce a clear adapter error when absent.
Import
import { requireKvPutIfAbsent } from "@graphrefly/ts/storage";
Signature
function requireKvPutIfAbsent(
tier: KvStorageTier<T>,
label = "kvStorage",
): PutIfAbsentKvStorageTier<T>
Parameters
| Parameter | Type | Description |
|---|---|---|
tier | KvStorageTier<T> | tier value used by the helper. |
label | unknown | label value used by the helper. |
Returns
A PutIfAbsentKvStorageTier<T> value.
Example
import { requireKvPutIfAbsent } from "@graphrefly/ts/storage";
Source
packages/ts/src/storage/kv.ts