storage.set
Stores the string value under key, replacing what was there.
Utilização
Save a sync cursor
import { storage } from 'kuito';
await storage.set('sync.cursor', 'page-12');
const cursor = await storage.get('sync.cursor'); // string | null
console.log(cursor ?? 'No previous sync');
await storage.delete('sync.cursor');Assinaturas
(key: string, value: string): Promise<void>Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
key | string | Sim | — |
value | string | Sim | — |
Devolve
Promise<void>
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.