Theo's Typesafe CultTTC
Theo's Typesafe Cult3y ago
4 replies
Max

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
Was this page helpful?