You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
712 B
15 lines
712 B
import EventInterface from './EventInterface';
|
|
declare class Event<EventPayload> implements EventInterface<EventPayload> {
|
|
constructor();
|
|
addHandler<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): Event<EventPayload>;
|
|
removeHandler<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): Event<EventPayload>;
|
|
isHandlerAttached<T>(handler: EventInterface.HandlerInterface<EventPayload, T>, context?: T): boolean;
|
|
dispatch: (payload: EventPayload) => void;
|
|
hasHandlers: boolean;
|
|
private _updateHasHandlers;
|
|
private _getHandlerIndex;
|
|
private _createDispatcher;
|
|
private _handlers;
|
|
private _contexts;
|
|
}
|
|
export default Event;
|