Skip to content

Dynamically type the data result of a hook according to inputs #2150

Answered by mmkal
anthonyshew asked this question in Q&A
Discussion options

You must be logged in to vote

I think this would require higher kinded types to work, so maybe one day: microsoft/TypeScript#1213

There are some workarounds involving module augmentation but I'm not sure they'd be practical in this case.

Replies: 10 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

anthonyshew
Jul 9, 2022
Collaborator Author

You must be logged in to vote
0 replies
Comment options

anthonyshew
Jul 10, 2022
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by KATT
Comment options

You must be logged in to vote
0 replies
Comment options

anthonyshew
Jul 10, 2022
Collaborator Author

You must be logged in to vote
0 replies
Comment options

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

anthonyshew Jul 12, 2022
Collaborator Author

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #2137 on July 11, 2022 05:27.