fetch client with throwErrors off: how to disambiguate union? #2197
Unanswered
jamesarosen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The fetch client example has this code:
but when I try to do that, I get a TypeScript error on the destructuring assignment:
I would expect there to be a type-narrowing function like
but I don't see anything like that in the docs.
I'm using TypeScript@5.8.3. I have
"strictNullChecks": false
in my TSConfig, which I suspect might be the problem.Beta Was this translation helpful? Give feedback.
All reactions