Socket.d.ts 331 Bytes
Newer Older
1 2 3 4 5 6 7 8
import WS from 'ws';
export declare type Send = (type: string, payload: any) => void;
export declare type On = (type: string) => Promise<any>;
export declare class Socket {
    private client?;
    constructor(server?: any, host?: string, port?: number);
    onConnection(listener: (socket: WS, emit: Send) => () => void): void;
}