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

Type Alias: ValidateIdColumnType<S>

type ValidateIdColumnType<S> = keyof S extends infer TableName
  ? TableName extends keyof S
    ? "id" extends keyof S[TableName]
      ? S[TableName]["id"] extends IdType<any>
        ? never
        : SchemaValidationError<`Table "${TableName & string}" id column must be a branded ID type (created with id("${TableName & string}")).`>
      : never
    : never
  : never;

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

Type Parameters

Type Parameter
S extends EvoluSchema

Was this page helpful?