© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•5mo ago•
2 replies
Cristian Sotomayor

I have some issues using drizzle as a package infering the types

Context:
I have a monorepo using turbo, pnpm, honojs and drizzle.
I have a server application and a package called database which exports the database client and the schemas

When I import on this way:
import * as schemas from '../schemas';
import * as schemas from '../schemas';

And import the
createDatabaseClient
createDatabaseClient
method the db instance returns me this type:
const db: NeonHttpDatabase<any> & {
    $client: NeonQueryFunction<false, false>;
} 
const db: NeonHttpDatabase<any> & {
    $client: NeonQueryFunction<false, false>;
} 


When I import on this way:
import { schemas } from '../schemas';
import { schemas } from '../schemas';
using an object with the schemas.
And import the
createDatabaseClient
createDatabaseClient
method the db instance returns me this type:
const db: NeonHttpDatabase<{
    accountsTable: PgTableWithColumns<{
        name: "accounts";
        schema: undefined;
        columns: {
            id: PgColumn<{
                name: "id";
                tableName: "accounts";
                dataType: "string";
                columnType: "PgText";
                data: string;
                driverParam: string;
                notNull: true;
const db: NeonHttpDatabase<{
    accountsTable: PgTableWithColumns<{
        name: "accounts";
        schema: undefined;
        columns: {
            id: PgColumn<{
                name: "id";
                tableName: "accounts";
                dataType: "string";
                columnType: "PgText";
                data: string;
                driverParam: string;
                notNull: true;



There's a way to not use the schemas object?
image.png
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Infering custom types
Drizzle TeamDTDrizzle Team / help
3y ago
Using Drizzle as a package in Turborepo doesn't work ?
Drizzle TeamDTDrizzle Team / help
3y ago
Using the drizzle-graphql with custom defined types.
Drizzle TeamDTDrizzle Team / help
16mo ago
I have some enum types on a schema, but I can't define it in drizzle-orm.
Drizzle TeamDTDrizzle Team / help
3y ago