import { IDisposable, ILogger, MaybePromise } from '@opensumi/ide-core-common';
import { IActivationEventService } from './types';
/**
 * 管理和发出插件 activateEvents
 * event 格式
 * topic:data
 */
export declare class ActivationEventServiceImpl implements IActivationEventService {
    private eventListeners;
    private collectTopicData;
    private wildCardTopics;
    activatedEventSet: Set<string>;
    protected readonly logger: ILogger;
    constructor();
    getTopicsData(topic: string): string[];
    fireEvent(topic: string, data?: string): Promise<void>;
    addWildCardTopic(topic: string): {
        dispose: () => void;
    };
    onEvent(event: string, listener: () => MaybePromise<void>): IDisposable;
    /**
     * 为了性能考虑，
     * 对于接受通配符的topic，以topic为单位存储listener
     * 对于不接受通配符的topic，直接以event作为单位存储listener
     * @param topic
     * @param listener
     */
    private addListener;
    tryRun(topic: string, data: string, listener: IActivationEventListener): Promise<void>;
}
interface IActivationEventListener {
    topic: string;
    data: string;
    execute: () => MaybePromise<void>;
}
export {};
//# sourceMappingURL=activation.service.d.ts.map