import type { WebSocketCloseEvent as NitroWSCloseEvent } from './NitroWebSocket.nitro';
export { createWebSocket } from './NitroWebSocket.nitro';
export type { HybridWebSocket, HybridWebSocketMessageEvent, WebSocketCloseEvent, WebSocketReadyState, } from './NitroWebSocket.nitro';
export type WebSocketMessageEvent = {
    data: string;
    isBinary: boolean;
    binaryData?: ArrayBuffer;
};
export { prewarmOnAppStart, removeFromPrewarmQueue, clearPrewarmQueue, } from './prewarm';
/**
 * Browser-compatible WebSocket wrapper backed by a Nitro HybridObject
 * using libwebsockets + mbedTLS under the hood.
 */
export declare class NitroWebSocket {
    private _ws;
    private _inspectorId;
    constructor(url: string, protocols?: string | string[], headers?: Record<string, string>);
    get readyState(): import("./NitroWebSocket.nitro").WebSocketReadyState;
    get url(): string;
    get protocol(): string;
    get bufferedAmount(): number;
    get extensions(): string;
    set onopen(fn: (() => void) | null);
    set onmessage(fn: ((e: WebSocketMessageEvent) => void) | null);
    set onclose(fn: ((e: NitroWSCloseEvent) => void) | null);
    set onerror(fn: ((error: string) => void) | null);
    send(data: string | ArrayBuffer): void;
    close(code?: number, reason?: string): void;
}
