mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
16 lines
712 B
TypeScript
16 lines
712 B
TypeScript
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;
|