SerializedSchema

See source code

Union type representing all supported serialized schema formats.

This type allows the store to handle both legacy (V1) and current (V2) schema formats during deserialization and migration.

type SerializedSchema = SerializedSchemaV1 | SerializedSchemaV2

Example

function handleSchema(schema: SerializedSchema) {
  if (schema.schemaVersion === 1) {
    // Handle V1 format
    console.log('Store version:', schema.storeVersion)
  } else {
    // Handle V2 format
    console.log('Sequences:', schema.sequences)
  }
}
Prev
RSIndexMap
Next
SerializedStore