tRPCttRPC
Powered by
cha0sg0dC
tRPC•3y ago•
8 replies
cha0sg0d

How to get the type of context after middleware context extension?

I have a middleware where I validate and set a userId. My router knows that userId is no longer undefined, but I need to pass the route context to another function. How do I set the input type for that function such that
userId
userId
is no longer undefined?
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

Get the type of context after middleware
Patryk MakowskiPPatryk Makowski / ❓-help
3y ago
Getting the type of context
TribeTTribe / ❓-help
2y ago
Infer context from procedure after middleware
VinnieVVinnie / ❓-help
2y ago