type EventType = string | symbol;
type Events = Record<EventType, unknown>;
type Handler = (event: Events[keyof Events]) => void;
declare class EventEmitter {
    all: Map<EventType, Handler[]>;
    on<Key extends keyof Events>(type: Key, handler: Handler): void;
    off<Key extends keyof Events>(type: Key, handler?: Handler): void;
    emit<Key extends keyof Events>(type: Key, evt?: Events[Key]): void;
}
export declare class EventBus {
    private readonly eventEmitter;
    private readonly name?;
    private logger;
    /**
     * 内核触发的事件名
     */
    readonly names: never[];
    constructor(emitter: EventEmitter, name?: string);
    private getMsgPrefix;
    /**
     * 监听事件
     * @param event 事件名称
     * @param listener 事件回调
     */
    on(event: string, listener: (...args: any[]) => void): () => void;
    /**
     * 取消监听事件
     * @param event 事件名称
     * @param listener 事件回调
     */
    off(event: string, listener: (...args: any[]) => void): void;
    /**
     * 触发事件
     * @param event 事件名称
     * @param args 事件参数
     * @returns
     */
    emit(event: string, ...args: any[]): void;
}
/**
 * 创建一个独立模块事件总线
 * @param name 模块名称
 */
export declare const createEventBus: (name: string) => EventBus;
export {};
