tRPCttRPC
Powered by
iDarkLightningI
tRPC•4y ago
iDarkLightning

Infer the type of ctx for a specific procedure

Let's say I had a helper function that I wanted to pass the context to, I can't use the default Context type, because this helper is only used for procedures that add things to the context. Is it possible to infer the type of the context after a specific procedure runs?
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

How can I infer the trpc.procedure.mutationOptions type?
AnonTGAAnonTG / ❓-help
2mo ago
Infer TRoot and TProcedure for specific procedures (polymorphism)
FluXFFluX / ❓-help
15mo ago
How can I access ctx from inside of a procedure?
santiSsanti / ❓-help
3y ago