Change `useQuery` error type
Hi, I'm trying to update the error type for my useQuery calls to
So that I can access the status codes from the component. Unfortunately Typescript isn't letting me change the error type in the way I expected (see attached image). I get a "No overload matches this call" error.
Any advice would be appreciated

3 Replies
correct-apricotOP•14mo ago
specialQueryOptions
being a fn that returns
sensitive-blue•14mo ago
TypeScript | TanStack Query React Docs
React Query is now written in TypeScript to make sure the library and your projects are type-safe!
Things to keep in mind:
correct-apricotOP•14mo ago
Thanks!