GoScrobble/web/node_modules/microevent.ts/lib/Event.d.ts

16 lines
712 B
TypeScript
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
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;