GraphReFlyTS

API Reference

hasKvPutIfAbsent()

Runtime guard for typed KV tiers that expose D85 conditional create.

Import

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

Signature

function hasKvPutIfAbsent(tier: KvStorageTier<T>): tier is PutIfAbsentKvStorageTier<T>

Parameters

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

Returns

A tier is PutIfAbsentKvStorageTier<T> value.

Example

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

Source

packages/ts/src/storage/kv.ts