/** WHATWG `WebSocket` subset used by the transport. Both `ws` and the native * browser `WebSocket` satisfy this. */ export interface SocketLike { readyState: number; send(data: string): void; close(): void; addEventListener(type: string, listener: (event: any) => void, options?: { once?: boolean; }): void; removeEventListener(type: string, listener: (event: any) => void): void; } /** `WebSocket.OPEN` — always `1` per the WHATWG spec. */ export declare const OPEN = 1; /** Factory contract for `createWebSocket`, shared by both platform bindings. * `protocols` selects a WebSocket subprotocol — the client always requests * `graphql-transport-ws`, the single protocol carrying every BrowserQL op. */ export type CreateWebSocket = (url: string, headers?: Record, protocols?: string | string[]) => SocketLike; //# sourceMappingURL=platform-types.d.ts.map