Core
WebSocketHandleConstructor
Constructor type accepted by withWebSocketHandle.
@defjs/core · Type
Signature
type WebSocketHandleConstructor = { readonly OPEN: number; } & (new (...args: never[]) => WebSocketHandle);
A class or function that builds a WebSocketHandle and exposes the numeric OPEN ready-state constant. The transport compares readyState with OPEN.
It is called as new WebSocketImpl(url), or new WebSocketImpl(url, protocols) when subprotocols are set. The default is globalThis.WebSocket.
Members
Prop
Type
OPEN number