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
GitHub
[BUG]: TypeError: Object literal may only specify known properties ...
What version of drizzle-orm are you using? 0.32.0 What version of drizzle-kit are you using? 0.23.0 Describe the Bug I bumped the versions of drizzle-orm 0.31.4 -> 0.32.0 and drizzle-kit 0.22.8 ...
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server