import { ModuleAPI } from './module';
export interface Handler {
    (...params: any[]): HandlerInterface | Promise<HandlerInterface>;
}
export interface HandlerInterface {
    (mod: ModuleAPI): HandlerObject | Promise<HandlerObject>;
}
export interface HandlerObject {
    state: any;
    handle: HandlerFunction;
    destroy: {
        (): void | Promise<void>;
    };
}
export interface HandlerFunction {
    (id: string, value: HandlerMsg): Promise<any>;
}
export declare type HandlerMsg = any;
