API reference / @evolu/common / Evolu/Internal / ValidateColumnTypes

Type Alias: ValidateColumnTypes<S>

type ValidateColumnTypes<S> = keyof S extends infer TableName
  ? TableName extends keyof S
    ? keyof S[TableName] extends infer ColumnName
      ? ColumnName extends keyof S[TableName]
        ? InferType<S[TableName][ColumnName]> extends SqliteValue
          ? never
          : SchemaValidationError<`Table "${TableName & string}" column "${ColumnName & string}" type is not compatible with SQLite. Column types must extend SqliteValue (string, number, Uint8Array, or null).`>
        : never
      : never
    : never
  : never;

Defined in: packages/common/src/Evolu/Schema.ts:138

Type Parameters

Type Parameter
S extends EvoluSchema

Was this page helpful?