YeonHoPark
10/14/2021, 2:04 AMRyan
10/14/2021, 5:50 AMPrisma.UserSelect
so TypeScript cannot infer the actual values. In the second one, you have specified the exact value.
Remove Prisma.UserSelect
from the first and it both will behave the same.YeonHoPark
10/14/2021, 6:19 AMRemovecannot remove Prisma.UserSelect because select is declared outside, and need define a type.from the first and it both will behave the same.Prisma.UserSelect
I dont’t quite understand what you mean. the only thing i did defined the select variable used for prisma api and specify the type. 🤔 our team often declares the value used for the prisma client api externally as in the case above.so TypeScript cannot infer the actual values.Prisma.UserSelect
Ryan
10/14/2021, 7:16 AMPrisma.UserSelect
. The UserSelect
is a broad type and TypeScript cannot narrow it down to what you have added in as values.YeonHoPark
10/14/2021, 7:28 AM