GraphReFlyTS

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

ParameterTypeDescription
backendStorageBackendbackend value used by the helper.
labelunknownlabel value used by the helper.

Returns

A PutIfAbsentStorageBackend value.

Example

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

Source

packages/ts/src/storage/backend.ts