declare class Teller { private channel; private listener?; /** * Cross-origin solution to communicate between tabs, windows, and iframes. Usage: - Create a new Teller instance. - If you want to use a custom message type, you can pass it to Teller. - const tellerManager = new Teller(); - Call tellerManager.sendMessage({message, targetWindow, origin}) to send a message to the other tab/window/iframe. - Call tellerManager.setupListener({onReceiveMessage}) to listen for messages from the other tab/window/iframe. - Call tellerManager.close(); to close the active listener. Details on: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage */ constructor(options: TellerOptions); /** * Only messages from `source`, the window we opened, served from `origin` * are delivered. Any window holding a reference to this page can post to it * (an embedded iframe, the site that opened it), and the channel name is * public, so a channel match alone would let them answer for Pera Web. */ setupListener({ onReceiveMessage, origin, source }: { onReceiveMessage: (event: MessageEvent>) => void; /** URL whose origin the messages must come from. */ origin: string; source: MessageEventSource | null; }): void; sendMessage({ message, targetWindow, origin, timeout }: TellerMessageOptions): void; close(): void; } export default Teller;