PersistOptions
interfaceShared configuration.
Properties
| Name | Type | Description |
|---|---|---|
adapter | PersistenceAdapter | |
key | string | Storage key. |
maxNodes? | number | Largest 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) => void | Called on any failure. |
scheduler? | Scheduler | Where 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? | number | Coalescing window for writes, in milliseconds. Defaults to 250. |
version | number | Schema version of what is written. |