UNPKG

555 BTypeScriptView Raw
1import type { Packet, RawData } from "engine.io-parser";
2import { BaseWS } from "./websocket.js";
3/**
4 * WebSocket transport based on the `WebSocket` object provided by the `ws` package.
5 *
6 * Usage: Node.js, Deno (compat), Bun (compat)
7 *
8 * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
9 * @see https://caniuse.com/mdn-api_websocket
10 */
11export declare class WS extends BaseWS {
12 createSocket(uri: string, protocols: string | string[] | undefined, opts: Record<string, any>): any;
13 doWrite(packet: Packet, data: RawData): void;
14}