VersionDef
Defined in: packages/core/src/types.ts:112
Defines a specific version of the configuration schema and how to migrate to it.
Type Parameters
Section titled “Type Parameters”TPrev
The type of the configuration in the previous version.
TNextSchema
Section titled “TNextSchema”TNextSchema extends ZodType = ZodType
The Zod schema defining the shape of the configuration in this version.
Properties
Section titled “Properties”migration()?
Section titled “migration()?”
optionalmigration: (prev) =>input<TNextSchema>
Defined in: packages/core/src/types.ts:121
A function that transforms the configuration from the previous version (TPrev)
to the input of this version’s schema.
Parameters
Section titled “Parameters”TPrev
Returns
Section titled “Returns”input<TNextSchema>
schema
Section titled “schema”schema:
TNextSchema
Defined in: packages/core/src/types.ts:116
The Zod schema defining the shape and defaults of this version.
version
Section titled “version”version:
number
Defined in: packages/core/src/types.ts:114
The schema version number (must be incremental).