-
The error type can be explicitly defined (https://tanstack.com/query/v4/docs/typescript#typing-the-error-field) by passing the types for both Is there a way to do this while continuing to infer the type for Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Oct 5, 2022
Replies: 1 comment 1 reply
-
no because TypeScript has no way to do partial type inference. see this open issue in TS: However, we also have some slight improvements planned here to default |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
HemalR
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no because TypeScript has no way to do partial type inference. see this open issue in TS:
However, we also have some slight improvements planned here to default
TError
toError
in v5. Have a look here: