export declare type ApiService = ReturnType<typeof initApiService>;
export declare function initApiService(): {
    on: {
        <Key extends "uiMethod" | "moduleEvent">(type: Key, handler: import("mitt").Handler<{
            uiMethod: {
                componentId: string;
                name: string;
                parameters?: any;
            };
            moduleEvent: {
                fromId: string;
                eventType: string;
            };
        }[Key]>): void;
        (type: "*", handler: import("mitt").WildcardHandler<{
            uiMethod: {
                componentId: string;
                name: string;
                parameters?: any;
            };
            moduleEvent: {
                fromId: string;
                eventType: string;
            };
        }>): void;
    };
    off: {
        <Key_1 extends "uiMethod" | "moduleEvent">(type: Key_1, handler?: import("mitt").Handler<{
            uiMethod: {
                componentId: string;
                name: string;
                parameters?: any;
            };
            moduleEvent: {
                fromId: string;
                eventType: string;
            };
        }[Key_1]> | undefined): void;
        (type: "*", handler: import("mitt").WildcardHandler<{
            uiMethod: {
                componentId: string;
                name: string;
                parameters?: any;
            };
            moduleEvent: {
                fromId: string;
                eventType: string;
            };
        }>): void;
    };
    send: {
        <Key_2 extends "uiMethod" | "moduleEvent">(type: Key_2, event: {
            uiMethod: {
                componentId: string;
                name: string;
                parameters?: any;
            };
            moduleEvent: {
                fromId: string;
                eventType: string;
            };
        }[Key_2]): void;
        <Key_3 extends "uiMethod" | "moduleEvent">(type: undefined extends {
            uiMethod: {
                componentId: string;
                name: string;
                parameters?: any;
            };
            moduleEvent: {
                fromId: string;
                eventType: string;
            };
        }[Key_3] ? Key_3 : never): void;
    };
};
