Skip to main content

Interface: KeyValueStore

Defined in: contract.ts:113

@rasd/storage — the public entry point.

This package owns three things and nothing else: the frozen StorageAdapter contract, a reference implementation of it, and the suite that proves any other implementation matches. It deliberately has no dependency on @rasd/license — that is what makes export() available in every licence state a property of the module graph rather than a promise (docs/09 §10).

Methods

delete()

delete(key): Promise<void>;

Defined in: contract.ts:116

Parameters

ParameterType
keystring

Returns

Promise<void>


get()

get<T>(key): Promise<T | undefined>;

Defined in: contract.ts:114

Type Parameters

Type ParameterDefault type
Tunknown

Parameters

ParameterType
keystring

Returns

Promise<T | undefined>


keys()

keys(prefix?): Promise<string[]>;

Defined in: contract.ts:117

Parameters

ParameterType
prefix?string

Returns

Promise<string[]>


set()

set(key, value): Promise<void>;

Defined in: contract.ts:115

Parameters

ParameterType
keystring
valueunknown

Returns

Promise<void>