tRPCttRPC
Powered by
lukasL
tRPC•4y ago•
2 replies
lukas

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?
unknown.png
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.
Inferring Types | tRPC
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to infer query types on client?
MadMaxMMadMax / ❓-help
3y ago
How to infer types from input?
PieterPPieter / ❓-help
3y ago
How to infer types of a query
HussamHHussam / ❓-help
3y ago
client unable to infer output types
advancedAadvanced / ❓-help
2y ago