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