import { WorkerInputMessage, WorkerOutputMessage } from "./communicator.js";
import { PublicChannelData, VisualizerConnection, ServiceRequestArgs } from "./connection.js";
import { ArtificialWorker } from "../utils/artificial-worker.js";
export type EventData = {
    channels: PublicChannelData[] | null;
    services: string[] | null;
};
export declare class FoxgloveWebSocketAdapter extends EventTarget implements WebSocket {
    #private;
    binaryType: "blob" | "arraybuffer";
    protocol: string;
    url: string;
    extensions: string;
    bufferedAmount: number;
    readyState: number;
    onerror: ((this: WebSocket, event: unknown) => void) | ReactNull;
    onopen: ((this: WebSocket, event: unknown) => void) | ReactNull;
    onclose: ((this: WebSocket, event: unknown) => void) | ReactNull;
    onmessage: ((this: WebSocket, event: unknown) => void) | ReactNull;
    /** The connection is not yet open. */
    readonly CONNECTING: 0;
    /**  The connection is open and ready to communicate. */
    readonly OPEN: 1;
    /**  The connection is in the process of closing. */
    readonly CLOSING: 2;
    /**  The connection is closed or couldn't be opened. */
    readonly CLOSED: 3;
    constructor(data: (WorkerInputMessage & {
        type: 'open';
    })['data'], worker: Worker | ArtificialWorker<WorkerInputMessage, WorkerOutputMessage>);
    on: VisualizerConnection["on"];
    off: VisualizerConnection["off"];
    close(): void;
    subscribe({ topics }: {
        topics: string[];
    }): void;
    unsubscribe({ topics }: {
        topics: string[];
    }): void;
    request({ name, timeout, ignoreResponse, body }: ServiceRequestArgs): Promise<DataView | null>;
    send(data: string | ArrayBuffer | ArrayBufferView): void;
}
//# sourceMappingURL=adapter.d.ts.map