how do I get the types from data off of a use query???

const { data, isLoading: isGetListDataLoading } = api.list.getLists.useQuery() im using this code in a context provider and I want to pass this data down but I can't cause typescript.
Solution:
src/utils/api.ts should export the type RouterOutputs
Jump to solution
3 Replies
Solution
Neto
Neto2y ago
src/utils/api.ts should export the type RouterOutputs
Neto
Neto2y ago
then you acess with RouterOuputs['some']['router']['operation']['data']
Max
MaxOP2y ago
Thanks @nyx (Rustular DevRel) I've been loosing my mind for about 3hrs about how to solve this...thank you. Very new to this stack

Did you find this page helpful?