KVNamespaceinterface

{
	get(key: string, options: { type: "json" }): Promise<unknown>;
	put(key: string, value: string): Promise<void>;
	delete(key: string): Promise<void>;
}

Minimal interface matching the Cloudflare Workers KV namespace runtime object.

Declares only the subset of methods CloudflareKVProvider uses, so the @cloudflare/workers-types package is not required as a dependency.

Methods

Go

KVNamespace.get()method

get(key: string, options: { type: "json" }): Promise<unknown>
Go

KVNamespace.put()method

put(key: string, value: string): Promise<void>
Go

KVNamespace.delete()method

delete(key: string): Promise<void>