La referencia de la API está disponible solo en inglés por ahora.

PersistOptions

interface
persistence/persist.ts:32

Shared configuration.

Properties

NameTypeDescription
adapterPersistenceAdapter
keystringStorage key.
maxNodes?numberLargest number of values encoded in one write. Defaults to 100 000.
migrate?(persisted: unknown, from: number) => null | Record<string, unknown>Upgrades a payload written by an older version.
onError?(error: unknown, phase: PersistencePhase) => voidCalled on any failure.
scheduler?SchedulerWhere the coalescing timer is armed. Defaults to the global setTimeout and clearTimeout, looked up when the timer is armed, so fake timers installed later still apply.
slices?readonly string[]Slices to persist. Every slice by default.
throttleMs?numberCoalescing window for writes, in milliseconds. Defaults to 250.
versionnumberSchema version of what is written.