kkrpc
    Preparing search index...

    Interface WebSocketLike

    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.

    interface WebSocketLike {
        onerror: null | ((event: any) => void);
        onmessage: null | ((event: any) => void);
        close(): void;
        send(data: string): void;
    }
    Index

    Properties

    Methods

    Properties

    onerror: null | ((event: any) => void)
    onmessage: null | ((event: any) => void)

    Methods