storage.peek
The value under key, or null, read synchronously on the JS thread: for
small reads at startup. It sees every write whose promise resolved.
Utilização
Read one small startup value synchronously.
// Read one small startup value synchronously.
import { storage } from 'kuito';
const lastAccount = storage.peek('account.last');
console.log(lastAccount ?? 'Choose an account');Assinaturas
(key: string): string | nullParâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
key | string | Sim | — |
Devolve
string
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.