We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In monorepo(turborepo) project, I have drizzle as package. From it, a am importing schema and infering inster and select types:
/* user.interfaces.ts */ import { users } from '@repo/drizzle/schema' export type UsersInsert = typeof users.$inferInsert export type UsersSelect = typeof users.$inferSelect
But if i try to run encore run it fails with these errors:
encore run
│ error: typeof with non-ident not yet supported │ --> \user\user.interfaces.ts:6:31 │ | │ 6 | export type UsersInsert = typeof users.$inferInsert │ | ^^^^^^^^^^^^^^^^^^
│ error: expected named interface type, found Basic(Never) │ --> \user\user.controller.ts:7:15 │ | │ 7 | async (data: UsersInsert): Promise<UsersSelect> => { │ | ^^^^^^^^^^^
If I change types from infered to static, then in works.
/* user.interfaces.ts */ export type UsersInsert = { firstName: string lastName: string displayName: string email: string } export type UsersSelect = { id: number firstName: string lastName: string displayName: string email: string }
But this costs me automatic type safety with drizzle, because I would have to maintain these types separately.
The text was updated successfully, but these errors were encountered:
I am having the same issue. had to use the separate types
Sorry, something went wrong.
duplicate of:
No branches or pull requests
In monorepo(turborepo) project, I have drizzle as package. From it, a am importing schema and infering inster and select types:
But if i try to run
encore run
it fails with these errors:If I change types from infered to static, then in works.
But this costs me automatic type safety with drizzle, because I would have to maintain these types separately.
The text was updated successfully, but these errors were encountered: