Interface: IEventEmitter
api.IEventEmitter
Interface describing event emitter members.
#
Implemented by#
Methods#
offâ–¸ off<T
>(type
, handler
): void
Unsubscribe from an event by its name.
#
Type parametersName |
---|
T |
#
ParametersName | Type | Description |
---|---|---|
type | string | The name of the event to unsubscribe from. |
handler | (event : T ) => void | The handler to remove. |
#
Returnsvoid
#
Defined inutil/interfaces/IEventEmitter.ts:19
#
onâ–¸ on<T
>(type
, handler
): void
Subscribe to an event by its name.
#
Type parametersName |
---|
T |
#
ParametersName | Type | Description |
---|---|---|
type | string | The name of the event to subscribe to. |
handler | (event : T ) => void | The handler called when the event occurs. |
#
Returnsvoid