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
Neto15mo ago
src/utils/api.ts should export the type RouterOutputs
Neto
Neto15mo ago
then you acess with RouterOuputs['some']['router']['operation']['data']
Max
Max15mo 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
Want results from more Discord servers?
Add your server