Get Correct Return Type when using Prisma ORM inside a method that accepts the client's args
Hi!
So I have this simple example
The return value of
getExampleItem
is not being correctly typed from the context of include
passed onto it (messages
is non-existant). Also tried with select
and it doesn't narrow the return.
I might have an error in my prismaArgs
type that I'm not aware of, can you shed some light here how can I correctly type this so I get the correct type returned depending on different prismaArgs
?)5 Replies