Get types of return value from trpc api call
For some reason in this new project when I get say the type of data I'm passing into useQuery is undefined it's actually expecting what would be the response of the function?
Does anyone have any idea why, this works in other projects and I've used this consistently.
5 Replies
If I used a more complex API call it just expects back what would be returned from the API call.
Here is an example on a more complex api endpoint.
You don't need to use ReturnType directly
There should be a export on the API folder relates to types
Is there 🤦♂️
Solution
RouterOutput["discord"]["getUserTeams"]
Oh I'm an idiot haha
Thanks so much