import { ConnectMessage } from './types'; export declare function connect(currentGlobal: typeof globalThis, onConnect: (channel: Channel, message: ConnectMessage, messageQueue: unknown[]) => void): void; export declare class Channel { private _messageHandlers; private _responseHandlers; private _send; constructor(sourceId: string, currentGlobal: typeof globalThis); call(method: string, ...params: any[]): Promise; send(method: string, ...params: any[]): void; addHandler(method: string, handler: (...args: T) => void): () => boolean; private _handleMessage; } export declare function sendInitMessage(currentGlobal: typeof globalThis): number;