How to infer the return type of query based on the params passed - RTK Query ? #2765
Answered
by
phryneas
LoyalPotato
asked this question in
Q&A
-
Hello, This was previously asked here #2701 but with no answers. I just wanted to know if there has been any development that allows this or if it's not possible at all. |
Beta Was this translation helpful? Give feedback.
Answered by
phryneas
Oct 11, 2022
Replies: 1 comment 1 reply
-
It's not possible. That's not really an RTKQ limitation, it's a TypeScript limitation: we need to map over those types to create new functions, and at that point is is just not possible to have any connection between |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LoyalPotato
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not possible. That's not really an RTKQ limitation, it's a TypeScript limitation: we need to map over those types to create new functions, and at that point is is just not possible to have any connection between
ArgType
andReturnType
.