asUpgradeResponse(response: unknown,binding: string): DurableObjectUpgradeResponse
Narrows a Durable Object stub's response to one carrying a socket.
A stub answering an ordinary Response — a 404 from a DO class with no
upgrade path, a 500 from one that threw, a 101 from a runtime that does not
populate webSocket — fails here, naming the binding, rather than surfacing
later as a TypeError on undefined.accept() with nothing to point at.
The same response, narrowed