Skip to content

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
Discussion options

You must be logged in to vote

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 and ReturnType .

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LoyalPotato
Comment options

Answer selected by LoyalPotato
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants