PersistOptions
interfaceShared configuration.
Properties
| Name | Type | Description |
|---|---|---|
adapter | PersistenceAdapter | |
key | string | Storage key. |
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. |
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. |