drizzle-team / drizzle-team/drizzle-orm
[BUG]: Broken typings on Visual Studio Code@1.91.0 using Typescript@5.5
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### What version of `drizzle-orm` are you using?
0.31.1
### What version of `drizzle-kit` are you using?
0.22.2
### Describe the Bug
After the update of Visual Studio Code to the [latest (1.91.0)](https://github.com/microsoft/vscode/releases/tag/1.91.0) version, typescript started throwing errors like ones below, for every query.
I am working in the nx monorepo, so I had to install typescript in the root of the project and use workspace version of typescript to fix the error messages, but that's just a temporary fix.
By default this version of VSC uses typescript 5.5, everything works fine on 5.4.

```
No overload matches this call.
Overload 1 of 3, '(left: Column, object, object>, right: unknown): SQL', gave the following error.
Argument of type 'PgColumn<{ name: "id"; tableName: "deal"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>' is not assignable to parameter of type 'Column, object, object>'.
Types of property 'table' are incompatible.
Property '[IsDrizzleTable]' is missing in type 'PgTable' but required in type 'Table>>'.
Overload 2 of 3, '(left: Aliased, right: string | SQLWrapper): SQL', gave the following error.
Argument of type 'PgColumn<{ name: "id"; tableName: "deal"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>' is not assignable to parameter of type 'Aliased'.
Type 'PgColumn<{ name: "id"; tableName: "deal"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>' is missing the following properties from type 'Aliased': sql, fieldAlias
Overload 3 of 3, '(left: SQLWrapper, right: unknown): SQL', gave the following error.
Argument of type 'PgColumn<{ name: "id"; tableName: "deal"; dataType: "string"; columnType: "PgVarchar"; data: string; driverParam: string; notNull: true; hasDefault: true; enumValues: [string, ...string[]]; baseColumn: never; }, {}, {}>' is not assignable to parameter of type 'SQLWrapper'.
The types returned by 'getSQL()' are incompatible between these types.
Type 'import("/Users/nightspite/Code/polubee/node_modules/.pnpm/drizzle-orm@0.31.1_postgres@3.4.3/node_modules/drizzle-orm/sql/sql").SQL' is not assignable to type 'import("/Users/nightspite/Code/polubee/node_modules/.pnpm/drizzle-orm@0.31.1_react@18.2.0/node_modules/drizzle-orm/sql/sql").SQL'.
Types have separate declarations of a private property 'shouldInlineParams'.ts(2769)
table.d.cts(29, 5): '[IsDrizzleTable]' is declared here.
```
### Expected behavior
No error warnings
### Environment & setup
macos sonoma 14.4.1
vsc 1.91.0
typescript 5.5
node 20
pnpm 8.6.10
nx 19.2.2
eslint 8.55.0
Contributor guide
Assessment
This issue has not been assessed yet.