You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Drizzle ORM in my project and when i enabled the experimental Typescript Native VSCode extension (and also before that when i built the extension from main), i have many places where the typechecker fails.
Do you need a repro or do you know about these issues?
I get the same error. Seems to be because user code import the type from .d.ts but drizzle is internally importing the types from d.cts. This is the error it spits out.
Type 'import("/home/a/Documents/tsgo-repro/node_modules/drizzle-orm/sql/sql").SQL<unknown>' is not assignable to type 'import("/home/a/Documents/tsgo-repro/node_modules/drizzle-orm/sql/sql").SQL<unknown>'. Two different types with this name exist, but they are unrelated.
Types have separate declarations of a private property 'shouldInlineParams'.
Deleting the .d.cts removes this error but then the type checking fails because it cannot find the getSQL() defnintion.
Removing the where from the repro @jansedlon gave, removes all errors, even with the d.cts files there.
Activity
jakebailey commentedon May 23, 2025
A repro would be helpful.
jansedlon commentedon May 23, 2025
@jakebailey Here's the repro. I'm seeing more issues for example in Prisma but i'll wait when this gets fixed and see if it still occurs
aadito123 commentedon May 27, 2025
I get the same error. Seems to be because user code import the type from .d.ts but drizzle is internally importing the types from d.cts. This is the error it spits out.
Deleting the .d.cts removes this error but then the type checking fails because it cannot find the
getSQL()
defnintion.Removing the
where
from the repro @jansedlon gave, removes all errors, even with the d.cts files there.jansedlon commentedon May 27, 2025
@aadito123 Can confirm. But in the
db.insert
example there's no where and it still fails. Might be the same issue, just different sourceaadito123 commentedon May 27, 2025
@jansedlon ya I was just giving context to the error. I'm getting errors on just about every drizzle operation in my codebase
aadito123 commentedon Jun 4, 2025
seems to be fixed in the recent release
jansedlon commentedon Jun 4, 2025
Yep, seems like it, closing, thank you TS team