Ténèbres
Ténèbres
DTDrizzle Team
Created by Ténèbres on 10/11/2024 in #help
No overload matches call even with strict=true
Hello! I have the problem this issue describe https://github.com/drizzle-team/drizzle-orm/issues/2619 It seems that using strict=true fixes it for everyone except for me. Does someone have an idea why ? I made sure to reload my window after changing my tsconfig.json and it did make the error go away. here's my code & error, IDE highlights "id" on error.
export const devisTable = pgTable("devis", {
id: serial().primaryKey()
...
}, (devisTable) => ({
foreignKeys: [
foreignKey({
columns: [devisTable.userId],
foreignColumns: [usersTable.id],
})
]
}));
export const devisTable = pgTable("devis", {
id: serial().primaryKey()
...
}, (devisTable) => ({
foreignKeys: [
foreignKey({
columns: [devisTable.userId],
foreignColumns: [usersTable.id],
})
]
}));
"No overload matches this call.\n Overload 2 of 2, '(name: \"devis\", columns: (columnTypes: { bigint: { <TMode extends PgBigIntConfig[\"mode\"]>(config: PgBigIntConfig<TMode>): TMode extends \"number\" ? PgBigInt53BuilderInitial<\"\"> : PgBigInt64BuilderInitial<...>; <TName extends string, TMode extends PgBigIntConfig[\"mode\"]>(name: TName, config: PgBigIntConfig<...>): TMode extends \"number\" ? PgBigInt53BuilderInitial<...> : PgBigInt64BuilderInitial<...>; }; ... 30 more ...; vector: { ...; }; }) => Record<...>, extraConfig?: ((self: { ...; }) => PgTableExtraConfig) | undefined): PgTableWithColumns<...>', gave the following error.\n Object literal may only specify known properties, and 'id' does not exist in type '(columnTypes: { bigint: { <TMode extends PgBigIntConfig[\"mode\"]>(config: PgBigIntConfig<TMode>): TMode extends \"number\" ? PgBigInt53BuilderInitial<\"\"> : PgBigInt64BuilderInitial<...>; <TName extends string, TMode extends PgBigIntConfig[\"mode\"]>(name: TName, config: PgBigIntConfig<...>): TMode extends \"number\" ? PgBi...'."
"No overload matches this call.\n Overload 2 of 2, '(name: \"devis\", columns: (columnTypes: { bigint: { <TMode extends PgBigIntConfig[\"mode\"]>(config: PgBigIntConfig<TMode>): TMode extends \"number\" ? PgBigInt53BuilderInitial<\"\"> : PgBigInt64BuilderInitial<...>; <TName extends string, TMode extends PgBigIntConfig[\"mode\"]>(name: TName, config: PgBigIntConfig<...>): TMode extends \"number\" ? PgBigInt53BuilderInitial<...> : PgBigInt64BuilderInitial<...>; }; ... 30 more ...; vector: { ...; }; }) => Record<...>, extraConfig?: ((self: { ...; }) => PgTableExtraConfig) | undefined): PgTableWithColumns<...>', gave the following error.\n Object literal may only specify known properties, and 'id' does not exist in type '(columnTypes: { bigint: { <TMode extends PgBigIntConfig[\"mode\"]>(config: PgBigIntConfig<TMode>): TMode extends \"number\" ? PgBigInt53BuilderInitial<\"\"> : PgBigInt64BuilderInitial<...>; <TName extends string, TMode extends PgBigIntConfig[\"mode\"]>(name: TName, config: PgBigIntConfig<...>): TMode extends \"number\" ? PgBi...'."
I'd be really grateful for any help
1 replies