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