Infer ZSAError when action is generic? #167
Unanswered
ryantbrown
asked this question in
Q&A
Replies: 1 comment
-
{
...options,
onError: ({ err }) => {
// TypeScript has no idea what err is at all
// The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.
if (err instanceof ZSAError) {}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@IdoPesok Hoping to get some help here. I am having trouble inferring errors as ZSAError when the action is generic:
Beta Was this translation helpful? Give feedback.
All reactions