export type DaemonTransport = {
    send: (data: string | Uint8Array | ArrayBuffer) => void;
    close: (code?: number, reason?: string) => void;
    onMessage: (handler: (data: unknown) => void) => () => void;
    onOpen: (handler: () => void) => () => void;
    onClose: (handler: (event?: unknown) => void) => () => void;
    onError: (handler: (event?: unknown) => void) => () => void;
};
export type DaemonTransportFactory = (options: {
    url: string;
    headers?: Record<string, string>;
}) => DaemonTransport;
export type WebSocketFactory = (url: string, options?: {
    headers?: Record<string, string>;
}) => WebSocketLike;
export type WebSocketLike = {
    readyState: number;
    send: (data: string | Uint8Array | ArrayBuffer) => void;
    close: (code?: number, reason?: string) => void;
    binaryType?: string;
    on?: (event: string, listener: (...args: any[]) => void) => void;
    off?: (event: string, listener: (...args: any[]) => void) => void;
    removeListener?: (event: string, listener: (...args: any[]) => void) => void;
    addEventListener?: (event: string, listener: (event: any) => void) => void;
    removeEventListener?: (event: string, listener: (event: any) => void) => void;
    onopen?: ((event: any) => void) | null;
    onclose?: ((event: any) => void) | null;
    onerror?: ((event: any) => void) | null;
    onmessage?: ((event: any) => void) | null;
};
export interface TransportLogger {
    warn(obj: object, msg?: string): void;
}
//# sourceMappingURL=daemon-client-transport-types.d.ts.map