diff --git a/packages/library-legacy/src/rpc-websocket.ts b/packages/library-legacy/src/rpc-websocket.ts index 5426d9e1b306..114c2dd725a2 100644 --- a/packages/library-legacy/src/rpc-websocket.ts +++ b/packages/library-legacy/src/rpc-websocket.ts @@ -32,7 +32,9 @@ export default class RpcWebSocketClient extends RpcWebSocketCommonClient { ...options, }); if ('socket' in rpc) { - this.underlyingSocket = rpc.socket as ReturnType; + this.underlyingSocket = rpc.socket as ReturnType< + typeof WebSocketBrowserImpl + >; } else { this.underlyingSocket = rpc as NodeWebSocketType; }