method IDurableObjectStorage.get
IDurableObjectStorage.get<T>(key: string): Promise<T | undefined>

Reads one persisted value.

Type Parameters

Parameters

key: string

The storage key

Return Type

Promise<T | undefined>

The value, or undefined when the key is unset

Usage

import { type IDurableObjectStorage } from "cloudflare-plugin/src/index.ts";