import { AddEventListeners, EventType, IBroadcastChannel, Method, MethodType, Options as BroadcastChannelOptions } from "./types"; export declare function enforceOptions(options: BroadcastChannelOptions): void; /** * Contains all open channels, * used in tests to ensure everything is closed. */ export declare const OPEN_BROADCAST_CHANNELS: Set>; export declare class BroadcastChannel implements IBroadcastChannel { static _pubkey: boolean; id: number; name: string; options: BroadcastChannelOptions; method: Method; closed: boolean; _addEL: AddEventListeners; _prepP: Promise | null; _state: unknown; _uMP: Set>; _iL: boolean; private _onML; private _befC; constructor(name: string, options?: BroadcastChannelOptions); get type(): MethodType; get isClosed(): boolean; set onmessage(fn: ((data: T) => void) | null); postMessage(msg: T): Promise; postInternal(msg: unknown): Promise; addEventListener(type: EventType, fn: (data: T) => void): void; removeEventListener(type: EventType, fn: (data: T) => void): void; close(): Promise; }