Documentation / listr2 / EventManager
Class: EventManager<Event, Map>
Extended by
Type Parameters
• Event extends string
= string
• Map extends Partial
<Record
<Event
, unknown
>> = Partial
<Record
<Event
, any
>>
Constructors
new EventManager()
new EventManager<
Event
,Map
>():EventManager
<Event
,Map
>
Returns
EventManager
<Event
, Map
>
Methods
emit()
emit<
E
>(dispatch
,args
?):void
Type Parameters
• E extends string
= Event
Parameters
• dispatch: E
• args?: EventData
<E
, Map
>
Returns
void
Defined in
packages/listr2/src/lib/event-manager.ts:8
on()
on<
E
>(dispatch
,handler
):void
Type Parameters
• E extends string
= Event
Parameters
• dispatch: E
• handler
Returns
void
Defined in
packages/listr2/src/lib/event-manager.ts:12
once()
once<
E
>(dispatch
,handler
):void
Type Parameters
• E extends string
= Event
Parameters
• dispatch: E
• handler
Returns
void
Defined in
packages/listr2/src/lib/event-manager.ts:16
off()
off<
E
>(dispatch
,handler
?):void
Type Parameters
• E extends string
= Event
Parameters
• dispatch: E
• handler?
Returns
void
Defined in
packages/listr2/src/lib/event-manager.ts:20
complete()
complete():
void
Returns
void
Defined in
packages/listr2/src/lib/event-manager.ts:24