interface IEventManagement { unsubscribe: () => void; stopPropagation: () => void; } interface ISubscribable { readonly count: number; subscribe: (handler: TypedEventHandler) => () => void; unsubscribe: (handler: TypedEventHandler) => void; one: (handler: TypedEventHandler) => () => void; has: (handler: TypedEventHandler) => boolean; clear: () => void; } interface ISubscription { readonly isExecuted: boolean; readonly isOnce: boolean; readonly handler: TypedEventHandler; } type IEventHandler = (argument: TypedEventArgument, eventManager: IEventManagement) => void; type TypedEventArgument = any; type TypedEventHandler = IEventHandler; interface IPropagationStatus { readonly propagationStopped: boolean; } export type IEvent = ISubscribable>; declare class BaseEventDispatcher implements IEvent { private _asEventWrapper?; protected _subscriptions: ISubscription[]; get count(): number; subscribe(handler: TypedEventHandler): () => void; one(handler: TypedEventHandler): () => void; has(handler: TypedEventHandler): boolean; unsubscribe(handler: TypedEventHandler): void; protected _dispatch(executeAsync: boolean, scope: any, argument: any): IPropagationStatus | null; protected createSubscription(handler: TypedEventHandler, isOnce: boolean): ISubscription; protected cleanup(subscription: ISubscription): void; clear(): void; dispatch(argument: TypedEventArgument): IPropagationStatus; dispatchAsync(argument: TypedEventArgument): void; asEvent(): IEvent; } export declare class EventDispatcher extends BaseEventDispatcher { private readonly _onSubscriptionCountChangeEvent; get onSubscriptionCountChangeEvent(): IEvent<{ count: number; }>; subscribe(handler: TypedEventHandler): () => void; one(handler: TypedEventHandler): () => void; unsubscribe(handler: TypedEventHandler): void; clear(): void; } export {};