Type cannot be inferred when using returning on insert
I have this function and it is causing typescript errors
res
is types correctly but I am getting this error
This is a simple project with no qorkspace, everything is installed in the same package9 Replies
I was originally using bun install but now tried with pnpm and got the same issue, the path in the error is for the local node_modules so it's not trying to reference something else
Interesting, are you linking drizzle-orm from a local build?
If not, can you provide a repro repo?
I am not linking drizzle from anywhere, I am getting a repro now
https://github.com/isaacfink/drizzle-bug-repro
@Angelelz I created a repro, I am running this with bun but I tested with pnpm and got the same results
GitHub
GitHub - isaacfink/drizzle-bug-repro
Contribute to isaacfink/drizzle-bug-repro development by creating an account on GitHub.
It might eb a tsconfig issue but I don't know what could cause it
Found it, removing composite form tsconfig did the trick
So, it is a non issue?
I would still like to understand why its happening but yeah my issue is resolved
TSConfig Reference - Docs on every TSConfig option
From allowJs to useDefineForClassFields the TSConfig reference includes information about all of the active compiler flags setting up a TypeScript project.
Maybe due to the declaration?
Since the types you needed some of them are internal, that's probably why it was complaining