storage.StorageEntry
A key and its value, or null when nothing is stored under it.
Usage
Read and write several keys together
This type is used by storage.getMany
import { storage } from 'kuito';
await storage.setMany([
['sync.cursor', 'page-12'],
['sync.finishedAt', String(Date.now())],
]);
const entries = await storage.getMany(['sync.cursor', 'sync.finishedAt']);
console.log(entries); // [key, value | null] pairs
const keys = await storage.keys();
console.log(keys);
await storage.deleteMany(['sync.cursor', 'sync.finishedAt']);Type declaration
export type StorageEntry = [key: string, value: string | null];Members 3
| Name | Type | Required | Description |
|---|---|---|---|
0 | string | Yes | — |
1 | string | Yes | — |
length | 2 | Yes | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.