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"];


but even that didnt work.

any pointers?
Was this page helpful?