t
tRPC
t
tRPC
How to pass input props as a generic type parameter to my output?
Original message was deleted
tRPC
Join
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,111
Members
View on Discord
A
Alex / KATT ๐ฑ
โข
10/23/22, 9:15 PM
https://github.com/trpc/trpc/discussions/2150
GitHub
Dynamically type the data result of a hook according to inputs ยท Di...
Hey
, folks
! We ran into a hiccup with trying to dynamically type the data that comes back from our endpoint
. Imagine an identity endpoint that can return either a string or a number
:
/
/ I recognize
.
.
.
A
Alex / KATT ๐ฑ
โข
10/23/22, 9:16 PM
If you need this you might wanna use graphql instead