declare type Serializable = string | number | boolean | null | RegExp | Serializable[] | { [property: string]: Serializable; }; export declare type GladosMsg = { kind: 'syn'; secret: string; namespace: string; } | { kind: 'syn_ack'; secret: string; } | { kind: 'ready'; methods: string[]; } | { kind: 'ready_ack'; methods: string[]; } | { kind: 'call'; method: string; id: number; args: Serializable[]; } | { kind: 'return'; method: string; id: number; result: Serializable; } | { kind: 'throw'; method: string; id: number; error: string; }; export declare type MethodInterface = { [key: string]: (...args: Serializable[]) => Promise; disconnect: () => Promise; }; export declare type Call = { method: string; resolve: (value?: any) => void; reject: (error?: Error) => void; id: number; }; export declare type LocalMethods = { [key: string]: (...args: any[]) => any | Promise; }; declare type InterfaceConstructionOptions = { methods: string[]; inflightCalls: Map; remote: Window; origin: string; disconnect: () => Promise; }; export declare const constructInterface: ({ methods, inflightCalls, remote, origin, disconnect, }: InterfaceConstructionOptions) => MethodInterface; export {};