Skip to content

RestoreOptions

Defined in: packages/save/src/Save.ts:107

Options for a versioned read (restore, loadSlot, autoPersist).

T

optional migrate?: (old, fromVersion) => T

Defined in: packages/save/src/Save.ts:116

Migrate previously-stored payload to the current encoded form. Receives the raw decoded payload (whatever shape the older version wrote) and the version it was written at. Return the new encoded form that this build’s Serializable.hydrate accepts.

unknown

number

T


optional version?: number

Defined in: packages/save/src/Save.ts:109

Current schema version. Defaults to 1.