V10. How to infer types on V10?
https://trpc.io/docs/v9/infer-types
I am trying to infer types to use the inputs on my yup forms in the front end but can't get this working and did not find an example docs for that.
The current example available at https://trpc.io/docs/v9/infer-types is depreciated on v10.
I managed to get this working by doing this as shown by the screenshot. Is this the way to go, can I build some auxiliary types to use this structure to infer inputs/outputs?
Inferring Types | tRPC
It is often useful to wrap functionality of your @trpc/client or @trpc/react api within other functions. For this purpose, it's necessary to be able to infer input types, output types, and api paths generated by your @trpc/server router.
![](https://utfs.io/f/59fc542f-100c-4bd7-a977-2dc2c5e8c3f0-4pl4mu.png)
2 Replies
Go to the v10 docs of the same page
Thanks 🙂