/** * WebsocketEnd is one end of a FakeWebsocket connection. It is used to simulate a websocket connection for testing or * matching the interface of a real websocket connection without doing any actual networking. */ declare class WebsocketEnd extends EventTarget { private readonly sendCallback; readonly protocol: string; private hasMessageListener; private bufferedEvents; constructor(protocol: string, sendCallback: (data: string | ArrayBufferLike | Blob | ArrayBufferView) => void); close(): void; addEventListener(type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; dispatchEvent(event: Event): boolean; send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void; } /** * FakeWebsocket is a pair of WebsocketEnds that are connected to each other. It is used to simulate a websocket * connection for testing or matching the interface of a real websocket connection without doing any actual networking. */ export declare class FakeWebsocket { clientSideWebsocket: WebsocketEnd; serverSideWebsocket: WebsocketEnd; constructor(protocol: string); } export {}; //# sourceMappingURL=FakeWebsocket.d.ts.map