Interface: EventEmitter<EventT>
Types.EventEmitter
Type parameters
Name | Type |
---|---|
EventT | extends BaseEvent |
Methods
emit
▸ emit(event
): void
Parameters
Name | Type |
---|---|
event | EventT |
Returns
void
off
▸ off(eventName
, handler
): void
Parameters
Name | Type |
---|---|
eventName | EventT ["name" ] |
handler | EventHandler <EventT > |
Returns
void
on
▸ on(eventName
, handler
): void
Parameters
Name | Type |
---|---|
eventName | EventT ["name" ] |
handler | EventHandler <EventT > |
Returns
void
use
▸ use(middleware
): void
Parameters
Name | Type |
---|---|
middleware | Middleware <EventT > |
Returns
void