db0
db0 copied to clipboard
Type issue with integrations
Environment
"db0": "^0.1.4", "drizzle-orm": "^0.31.2"
Reproduction
Write import { drizzle } from "db0/integrations/drizzle"; in any project and the IDE will tell you that types does not exists.
Describe the bug
Hey,
I'm trying to use this integration: https://db0.unjs.io/integrations/drizzle but my IDE complains about types.
While trying to understand why this could happens, it seems to be an issue with the compilation step where the ../../types does not exists anymore since every thing move to dist except integrations and connectors because of mkdist.
Additional context
No response
Logs
No response
@Barbapapazes, this worked for me...
import { drizzle } from "db0/integrations/drizzle/index";
@Barbapapazes, this worked for me...
import { drizzle } from "db0/integrations/drizzle/index";
Oohh ok, I'll give a try (but adding /index at the end, seems to be more a workaround than a normal behavior).
It works but not really because the type Database cannot be resolved so you can pass a string to the Drizzle integration and TypeScript won't complain.
fixed with https://github.com/unjs/db0/commit/c48530cda032175f0c0377df4addc99399063774