TypeScript errors in Plain English

TypeScript Error Translator

Error #5

Type '{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }' is missing the following properties from type '{ name: string; isAutoincrement: boolean; isPrimaryKey: true; hasRuntimeDefault: boolean; generated: any; columnType: "PgVarchar" | "PgText" | "PgUUID"; data: string; driverParam: string | number | boolean; ... 4 more ...; tableName: string; }': isAutoincrement, isPrimaryKey, hasRuntimeDefault, generated

Translation

Could not find a translation for error code #2739:

Type '{0}' is missing the following properties from type '{1}': {2}

Add a translation

Error #4

Type 'PgColumn<{ name: "id"; tableName: "user"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>' is not assignable to type 'DefaultPostgresColumn<{ columnType: "PgVarchar" | "PgText" | "PgUUID"; isPrimaryKey: true; data: string; notNull: true; dataType: "string"; }>'.

Translation

I was expecting a type matching A, but instead you passed B.

Explanation

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; }, {}, {}>

Error #3

The types of '_.config.columns.id' are incompatible between these types.

Translation

Could not find a translation for error code #2200:

The types of '{0}' are incompatible between these types.

Add a translation

Error #2

Type '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<...>; ...' is not assignable to type '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...'.

Translation

I was expecting a type matching A, but instead you passed B.

Explanation

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<...>; ...

Error #1

Type '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<...>; ...' is not assignable to type 'DefaultPostgresUsersTable'.

Translation

I was expecting a type matching A, but instead you passed B.

Explanation

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<...>; ...