OptionaldefaultOptionalschemaChecks values on write and on read: a Standard Schema (Zod, Valibot, ArkType…) or a type guard.
OptionalttlDefault lifetime of a written value in milliseconds. set(value, { ttl }) overrides it.
OptionalversionSchema version written with each value. Raise it when the shape changes. Default 1.
Optionalmigrationsmigrations[n] upgrades a value from version n - 1 to n.
OptionallegacyReads text this library did not write, for example a value saved with plain AsyncStorage before you adopted it. Return the value in the current shape; it is validated and rewritten.
Returned when nothing is stored, the value expired, or stored data could not be read.