Minimal WebSocket interface accepted by WebSocketServerIO.
This is a structural type covering only the members actually used,
so it works with both the DOM WebSocket and the ws library's WebSocket
without requiring a cast.
NOTE: The handler types use any for event parameters to allow assignment
from both DOM WebSocket (MessageEvent) and ws library (any) types.
Minimal WebSocket interface accepted by WebSocketServerIO.
This is a structural type covering only the members actually used, so it works with both the DOM WebSocket and the
wslibrary's WebSocket without requiring a cast.NOTE: The handler types use
anyfor event parameters to allow assignment from both DOM WebSocket (MessageEvent) and ws library (any) types.