How can I properly compile the type of schema?
Hello. I'm currently using Turborepo to manage the monorepo.
I want to separate the schema declaration of drizzle to internal package. But when I tries to export typeof schema/drizzle instance, it loses the information about tables.
I tried using tsc, esbuild, tsup but still no luck.
Is there anyone successfully compiled type of the schema?
2 Replies
compiles to
and importing from this
.d.ts
file doesn't reproduce same result when importing like import * from "./schema"
Oh, actually it still gives a problem without compile. directly export raw ts file doesn't do anything.
exporting like this from db repo fixes it!