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
| Parameter | Type |
|---|---|
key | string |
Returns
Promise<void>
get()
get<T>(key): Promise<T | undefined>;
Defined in: contract.ts:114
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type |
|---|---|
key | string |
Returns
Promise<T | undefined>
keys()
keys(prefix?): Promise<string[]>;
Defined in: contract.ts:117
Parameters
| Parameter | Type |
|---|---|
prefix? | string |
Returns
Promise<string[]>
set()
set(key, value): Promise<void>;
Defined in: contract.ts:115
Parameters
| Parameter | Type |
|---|---|
key | string |
value | unknown |
Returns
Promise<void>