import { CameraEvent, ModelEvent, ModelMouseEvent, RenderEvent } from "./constant";
export type EventType = ModelMouseEvent | RenderEvent | ModelEvent | string;
export declare class DTEvent<P = Record<string, any>> {
    stopped: boolean;
    type: EventType;
    event: MouseEvent | undefined;
    params: P;
    constructor(type: ModelMouseEvent | RenderEvent | CameraEvent | ModelEvent | string, p?: P);
    stopPropagation(): void;
}
export declare function createEvent<P extends Record<string, any>>(type: EventType, p: P): DTEvent<P>;
export default class EventEmitter {
    protected $listeners: Record<string, Function[]>;
    /**
     * 获取监听器数量
     */
    count(type?: string): number;
    /**
     * once event listener
     * @param event
     * @param listener
     */
    once(event: string, listener: Function): this;
    /**
     * 判定是否存在事件监听
     * @param event
     * @param listener
     */
    hasEventListener(event: string, listener: Function): boolean;
    /**
     * 获取事件的监听方法
     * @param event
     */
    getEventListener(event?: string): Function[] | Record<string, Function[]>;
    /**
     * add event listener
     * @param event
     * @param listener
     */
    addEventListener(event: string, listener: Function): () => void;
    /**
     * 触发监听的事件
     * emit event
     * @param name
     * @param event
     */
    emit(event: DTEvent<any> | string): void;
    /**
     * remove one event listener
     * @param event
     * @param listener
     */
    removeEventListener(event: string, listener: Function): void;
    /**
     * remove all event
     * @param event
     */
    removeAllListener(event?: string): void;
}
