autobotkilla
Explore posts from serversProblems typing a generic withPerson helper
First I want to say that I'm in love with Kysely! It's amazing. I could use some help getting the types right for a helper function I'm creating.
I'm trying to follow the relations recipe (the withPets and withMom example from the docs), but I want to make it slightly more reusable.
I have a withPerson method
When I try and use it like this
I get a typescript error: Argument of type 'ExpressionBuilder<DB, "Prospect">' is not assignable to parameter of type 'ExpressionBuilder<DB, keyof DB>'
9 replies