Typing onError
for defaultOptions
#4233
Unanswered
sethmbrown
asked this question in
Q&A
Replies: 1 comment 2 replies
-
I don't think you can type the defaultOptions. A runtime check with |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to type the
error
object in thedefaultOptions
of myqueryClient
Right now I have
const defaultOptions = DefaultOptions<AxiosError>
. When passingdeafultOptions
intonew QueryClient
, I get the following TS error -What is the correct way to handle typing the error object globally here? Thanks!
(Tried to post this on the community discord, but it did not appear to work)
Beta Was this translation helpful? Give feedback.
All reactions