storage.StorageEntry
A key and its value, or null when nothing is stored under it.
Utilização
Read and write several keys together
Este tipo é usado por 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']);Declaração do tipo
export type StorageEntry = [key: string, value: string | null];Membros 3
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
0 | string | Sim | — |
1 | string | Sim | — |
length | 2 | Sim | — |
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.