1 | import EventInterface from './EventInterface';
|
2 | declare class Event<EventPayload> implements EventInterface<EventPayload> {
|
3 | constructor();
|
4 | addHandler<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): Event<EventPayload>;
|
5 | removeHandler<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): Event<EventPayload>;
|
6 | isHandlerAttached<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): boolean;
|
7 | dispatch: (payload: EventPayload) => void;
|
8 | hasHandlers: boolean;
|
9 | private _updateHasHandlers;
|
10 | private _getHandlerIndex;
|
11 | private _createDispatcher;
|
12 | private _handlers;
|
13 | private _contexts;
|
14 | }
|
15 | export default Event;
|