import { IRPCMethods, IClientTransport, IRPCPublishment, ListeningTicket, RPCPublishmentName } from "@staffbar/types"; export default class IFrameClientTransport implements IClientTransport { constructor({ targetWindow, targetOrigin }: { targetWindow: Window; targetOrigin: string; }); private _targetWindow; private _targetOrigin; request(rpcName: string, argument: { [key: string]: any; }): Promise; /** * In order for `window.removeEventListener` to work we need to pass the same * exact function that we used for `addListener`. This is a way to cache that * value because `.bind(this)` mutates the original `_onRawMessageRecevied` * * This also implicitly tracks state about if we're listening or not, * `undefined` meaning not listening * */ private _listeneingRef; startListening(): void; stopListening(): void; private _publishmentHandlers; registerPublishmentHandler(publishmentName: RPCPublishmentName, handler: (publishment: IRPCPublishment) => void): ListeningTicket; deRegisterPublishmentHandler(publishmentName: RPCPublishmentName, ticket: ListeningTicket): void; private _onRawMessageReceived; private _onMessageReceived; private _onResponseMessageReceived; private _onPublishmentMesssageReceived; private _responseWaiters; private _waitForResponseToMatch; } export declare const buildRPCClient: (clientTransport: IClientTransport) => IRPCMethods; //# sourceMappingURL=index.d.ts.map