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