Skip to content

Why err.response is typed as any instead of Response? #1460

Answered by kitten
frederikhors asked this question in Q&A
Discussion options

You must be logged in to vote

That's because we don't want to type it or guarantee a type because the response may be set to any arrogant that describes the original result of a request, be it for WebSockets or other requests. In other words, because the transport protocol may be swapped out. We didn't want to set this to unknown for now because that may make it even more confusing, but yea, basically it isn't guaranteed to be a FetchResponse

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@frederikhors
Comment options

@frederikhors
Comment options

Answer selected by frederikhors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants