import { type IEvent, type MainEventTypes } from "@shapediver/viewer.shared.types"; import { Logger } from "../logger/Logger"; import { UuidGenerator } from "../uuid-generator/UuidGenerator"; import { type ICallback } from "./interfaces/ICallback"; export declare class EventEngine { private static _instance; private _eventListeners; protected readonly _logger: Logger; protected readonly _uuidGenerator: UuidGenerator; private constructor(); static get instance(): EventEngine; /** * Adds a listener that listenes to the provided type. If no valid type is specified, an error is thrown. * * @param type the type of the event * @param cb the callback that should be called * @returns an unique token to be able to remove the listener */ addListener(type: string | MainEventTypes, cb: ICallback): string; /** * Emits the event to all callbacks that listen to the type. * * @param type the type of the event * @param event the event to emit */ emitEvent(type: string | MainEventTypes, event: IEvent): void; /** * Removes a listener with the specified token. * * @param token the token of the listener * @returns result of the targeted operation */ removeListener(token: string): boolean; private convertTypeToString; } //# sourceMappingURL=EventEngine.d.ts.map