import { BroadcastMessage, MessageHandler } from '../../models/broadcast'; import { Subscription } from '../../models/common'; /** * A service that facilitates communication between different browser contexts * (such as tabs, windows, or iframes) of the same origin. * It uses the `BroadcastChannel` API to send and receive messages. */ export declare class BroadcastService { private readonly CHANNEL_NAME; private readonly MESSAGE_EVENT; private channel?; /** * Sends a message to all listening browser contexts on the same origin. * @param {BroadcastMessage} message The message to be sent. */ sendMessage(message: BroadcastMessage): void; /** * Subscribes to incoming messages. * @param {MessageHandler} callback The function to be executed when a message is received. * @returns {Subscription} An unsubscribe function. */ subscribeToMessages(callback: MessageHandler): Subscription; private getChannel; }