Skip to content

RestoreOptions

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

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

T

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

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

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:111

Current schema version. Defaults to 1.

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/save.md.