Could not find a translation for error code #2739:
Type '{0}' is missing the following properties from type '{1}': {2}
I was expecting a type matching A, but instead you passed B.
You can assign variables types to give me hints about what kind of types you want to allow in that variable. For instance:
const num: number = 0;
This tells me that num
will always be a number
.
But sometimes, you'll break that pact you made with me. For instance:
const num: number = 'some string';
In your case, you said that this type was the only thing assignable to that variable:
DefaultPostgresColumn<{ columnType: "PgVarchar" | "PgText" | "PgUUID"; isPrimaryKey: true; data: string; notNull: true; dataType: "string"; }>
And you passed me this instead:
PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>
Could not find a translation for error code #2200:
The types of '{0}' are incompatible between these types.
I was expecting a type matching A, but instead you passed B.
You can assign variables types to give me hints about what kind of types you want to allow in that variable. For instance:
const num: number = 0;
This tells me that num
will always be a number
.
But sometimes, you'll break that pact you made with me. For instance:
const num: number = 'some string';
In your case, you said that this type was the only thing assignable to that variable:
PgTable<{ name: string; columns: { id: DefaultPostgresColumn<{ columnType: "PgVarchar" | "PgText" | "PgUUID"; isPrimaryKey: true; data: string; notNull: true; dataType: "string"; }>; name: DefaultPostgresColumn<...>; email: DefaultPostgresColumn<...>; emailVerified: DefaultPostgresColumn<...>; image: DefaultPostgres...
And you passed me this instead:
PgTableWithColumns<{ name: "user"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [...]; baseColumn: never; }, {}, {}>; name: PgColumn<...>; email: PgColumn<...>; ...
I was expecting a type matching A, but instead you passed B.
You can assign variables types to give me hints about what kind of types you want to allow in that variable. For instance:
const num: number = 0;
This tells me that num
will always be a number
.
But sometimes, you'll break that pact you made with me. For instance:
const num: number = 'some string';
In your case, you said that this type was the only thing assignable to that variable:
DefaultPostgresUsersTable
And you passed me this instead:
PgTableWithColumns<{ name: "user"; schema: undefined; columns: { id: PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [...]; baseColumn: never; }, {}, {}>; name: PgColumn<...>; email: PgColumn<...>; ...