import EventEmitter from "events";
type Message = Request | Response;
type Request = {
    id: string;
    action: string;
    params: any;
};
type Response = {
    res: string;
    error?: string;
    data?: any;
};
export declare class MessageHost extends EventEmitter {
    #private;
    constructor(proc: any);
    onMessage(m: Message): void;
    sendResponse(id: any, err: any, res: any): void;
    call(action: string, params: any): Promise<any>;
}
export declare function init(proc: any): MessageHost;
export {};
