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
flat-fuchsiaOP•17mo ago
specialQueryOptions being a fn that returns
foreign-sapphire•17mo 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:
flat-fuchsiaOP•17mo ago
Thanks!