import { type PortWebSocketClass, type WebSocketClassOptions, type WebSocketConnection } from "../ws/client.js"; /** * Opens the transport of a socket through the ServiceWorker controlling this * page, for a page that has no adapter of its own: content a handler serves * under the same-origin dispatcher, or under a relay. The ServiceWorker * routes `url` like a fetch, and the handler accepts or refuses the upgrade. */ export declare function connectWebSocketThroughServiceWorker(url: string | URL, protocols?: string[], container?: ServiceWorkerContainer): Promise; /** * A WHATWG `WebSocket` class over `connectWebSocketThroughServiceWorker`. * Install it where the page's code expects `WebSocket`, e.g. * `globalThis.WebSocket = serviceWorkerWebSocketClass()` in content that only * talks to its own handlers. */ export declare function serviceWorkerWebSocketClass(options?: WebSocketClassOptions): PortWebSocketClass; //# sourceMappingURL=sw-websocket.d.ts.map