Return type from Prisma query
Hey Prisma ppl. I cannot find what is the Typescript type of a variable that returns
For example, what in this case the variable
Because, if I pass the variable
But there gotta be a better way.
findMany() For example, what in this case the variable
source type would be?const sources = await prisma.source.findMany()Because, if I pass the variable
source to other components, how to set the expected prop type to those components? currently, I'm doing something like this: sources: Awaited<ReturnType<typeof prisma.source.findMany>> But there gotta be a better way.