How to access inferred path types #1311
Answered
by
TheBestMoshe
TheBestMoshe
asked this question in
Q&A
-
I am trying to make a generic table component, which will allow the user to pass in a trpc query path, and it will render the response in a table. I want Typescript to enforce the routes accepted by trpc. Looking in the source code, I see the |
Beta Was this translation helpful? Give feedback.
Answered by
TheBestMoshe
Nov 25, 2021
Replies: 1 comment 1 reply
-
Answering my own question, the argument types can be inferred using standard TypeScript:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TheBestMoshe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Answering my own question, the argument types can be inferred using standard TypeScript:
StackOverflow