import type { WindowType } from 'cross-domain-utils'; import type { CustomType } from 'sandestin'; import { ZalgoPromise } from 'zalgo-promise'; import { METHOD } from './constants'; import type { Transport } from './types'; type SetLocationOptions = { readonly method?: typeof METHOD[keyof typeof METHOD]; readonly body?: Readonly>; }; type SerializedWindow = { readonly id: string; readonly getType: () => ZalgoPromise; readonly close: () => ZalgoPromise; readonly focus: () => ZalgoPromise; readonly isClosed: () => ZalgoPromise; readonly setLocation: (url: string, options?: SetLocationOptions) => ZalgoPromise; readonly getName: () => ZalgoPromise; readonly setName: (name: string) => ZalgoPromise; readonly getInstanceID: () => ZalgoPromise; }; type ProxyWindowOptions = { readonly send: Transport['send']; readonly win?: Window; readonly serializedWindow?: SerializedWindow; }; export declare class ProxyWindow { readonly isProxyWindow: true; private serializedWindow; private actualWindow; private readonly actualWindowPromise; constructor({ send, win, serializedWindow }: ProxyWindowOptions); getID(): string; getType(): ZalgoPromise; isPopup(): ZalgoPromise; setLocation(href: string, options?: SetLocationOptions): ZalgoPromise; getName(): ZalgoPromise; setName(name: string): ZalgoPromise; close(): ZalgoPromise; focus(): ZalgoPromise; isClosed(): ZalgoPromise; getWindow(): Window | undefined; setWindow(win: Window, { send }: Pick): void; awaitWindow(): ZalgoPromise; matchWindow(win: Window, { send }: Pick): ZalgoPromise; unwrap(): Window | ProxyWindow; getInstanceID(): ZalgoPromise; serialize(): SerializedWindow; static unwrap(win: Window | ProxyWindow): Window | ProxyWindow; static serialize(win: Window | ProxyWindow, { send }: Pick): SerializedWindow; static deserialize(serializedWindow: SerializedWindow, { send }: Pick): ProxyWindow; static isProxyWindow(value: unknown): value is ProxyWindow; static toProxyWindow(win: Window | ProxyWindow, { send }: Pick): ProxyWindow; } type WindowCustomType = CustomType; export declare const getWindowCustomType: ({ send }: Pick) => WindowCustomType; export {}; //# sourceMappingURL=proxy-window.d.ts.map