T
TanStack•2y ago
xenophobic-harlequin

How can I remove the InfiniteData wrapper from the TData type

I am creating an infinteQuery and using a selector to flatten and transform the data. The query works as expected but typescript is complaining because (I believe) the TData type wraps the response type with InfiniteData. Doesn't seem to make a difference whether I leave it to infer or explicitly set the types. Thanks!
3 Replies
rival-black
rival-black•2y ago
Should work with inference. Please show a TS playground
xenophobic-harlequin
xenophobic-harlequinOP•2y ago
I couldn't reproduce it in the TS playground but the TS playground was on v5 and I was still on v4. Updating to v5 fixed it 🙂
rival-black
rival-black•2y ago
That makes sense because we fixed this in v5

Did you find this page helpful?