tRPCttRPC
Powered by
LenskhaL
tRPC•8mo ago•
4 replies
Lenskha

How to get the non-array version of a RouterOutput['myRoute']

Hello, I'm trying to remove as many custom types as possible and instead use inferred types in the frontend. It works great to retrieve data from the server, but less when it comes to process that data via .filter() or .map() functions since those need the non-array version of the type.

anyone knows how to do it, or a nice alternative? Thanks 😀
Solution
How about
RouterOutput['myRoute'][number]
RouterOutput['myRoute'][number]
Jump to solution
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 to get the Request Body data of QStash
Rasel HossainRRasel Hossain / ❓-help
2y ago
Trying to get the return type of a procedure.
brrBbrr / ❓-help
2y ago
how to handle non-trpc errors?
pupoPpupo / ❓-help
7mo ago
How to get the type of context after middleware context extension?
cha0sg0dCcha0sg0d / ❓-help
3y ago