Search
Get Started
DT
Drizzle Team
•
3y ago
Angel
Type for select with relations?
Is it possible to infer select with relations
?
Currently im using
:
export let user: typeof user.$inferSelect & { profile?: typeof profile.$inferSelect };
export let user: typeof user.$inferSelect & { profile?: typeof profile.$inferSelect };
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,795
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
export
let
user
:
typeof
user.$inferSelect
&
{
profile
?:
typeof
profile.$inferSelect };
export
let
user
:
typeof
user.$inferSelect
&
{
profile
?:
typeof
profile.$inferSelect };
Similar Threads
Type generation for relations
DT
Drizzle Team / help
13mo ago
Get type for select query?
DT
Drizzle Team / help
3y ago
Infer typescript type from table with relations
DT
Drizzle Team / help
2y ago
Relations not building into type
DT
Drizzle Team / help
3y ago