GraphReFlyTS

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

ParameterTypeDescription
tierKvStorageTier<T>tier value used by the helper.
labelunknownlabel value used by the helper.

Returns

A PutIfAbsentKvStorageTier<T> value.

Example

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

Source

packages/ts/src/storage/kv.ts