Error: ... not assignable to parameter of type SelectedFields
I am trying to build a wrapper around drizzle select and this is being hard to achieve.
What do I want? I want to create a wrapper that receives a where clause and SelectedFields, but I want the type-safety in order to suggest only valid columns to the user. I have something like this:
But this is getting me to this error:
If I change from
unknown
to any
, everything works fine. What I really want, is to use $inferSelect
type so the method becomes type-safe with selects columns.
How can I do that?0 Replies