cody
cody
DTDrizzle Team
Created by cody on 7/27/2023 in #help
Is there a way I can use relational types?
I'm currently trying to make a helper function that essentially wraps a database call, but I can't seem to find nor hack myself into getting a type for the with parameter in the relational queries. I've tried things like
type T = NonNullable<Parameters<typeof db.query.projects.findFirst>[0]>["with"];
type T = NonNullable<Parameters<typeof db.query.projects.findFirst>[0]>["with"];
but even that didnt work. any pointers?
18 replies