How does the prisma client know/tell typescript wh...
# orm-help
w
How does the prisma client know/tell typescript when you use the
select
argument on a
find
that the return type only includes the selected items? (example in thread)
e
Are you asking about the technique used in TypeScript or how the Prisma Client gets the field ๐Ÿ™‚ ?
r
@William Chantry ๐Ÿ‘‹ You can look at the types by going to the definition of the function using
ctrl
+ click to check the signature ๐Ÿ™‚
w
@Ryan @Eddy Nguyen Iโ€™d like to know how its made ๐Ÿ™‚. Iโ€™d like to know how Prisma knows to generate the specific type based on runtime arguments of the function (unless theres some other code analysis goinโ€™ on)
r
You can have a look at this package that generates the types ๐Ÿ™‚