import type { Maybe } from "../common/index.js";
export declare type Channel = {
    send: (data: ChannelData) => void;
    close: () => void;
};
export declare type ChannelOptions = {
    username: string;
    handleMessage: (event: MessageEvent) => void;
};
export declare type ChannelData = string | ArrayBufferLike | Blob | ArrayBufferView;
export declare const createWssChannel: (options: ChannelOptions) => Promise<Channel>;
export declare const closeWssChannel: (socket: Maybe<WebSocket>) => () => void;
export declare const publishOnWssChannel: (socket: WebSocket) => (data: ChannelData) => void;
