Prepared queries typings lost after export in monorepo

I'm using SST and I defined my prepared queries in a separate core package to be used across functions in the functions package. The prepared queries are defined like that:
// packages/core/db/preparedQueries.ts
import { db } from "@db";
import { sql } from "drizzle-orm";


export const getAccountByUid = db.query.accounts.findFirst({
where: (accounts, { eq }) => eq(accounts.uid, sql.placeholder('uid')),
}).prepare();
// packages/core/db/preparedQueries.ts
import { db } from "@db";
import { sql } from "drizzle-orm";


export const getAccountByUid = db.query.accounts.findFirst({
where: (accounts, { eq }) => eq(accounts.uid, sql.placeholder('uid')),
}).prepare();
And then imported like this:
// packages/src/db/preparedQueries.ts
import { getAccountByUid } from "@guiderail/core/db/preparedQueries";
// packages/src/db/preparedQueries.ts
import { getAccountByUid } from "@guiderail/core/db/preparedQueries";
in preparedQueries.ts the type is well generated, but upon importing it's imported as any. Any ideas why it does that?
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server