PURISTA API / Modules / @purista/core / GenericEventEmitter
Class: GenericEventEmitter<T>
@purista/core.GenericEventEmitter
Type parameters
Name | Type |
---|---|
T | extends EventMap |
Hierarchy
GenericEventEmitter
Implements
IEmitter
<T
>
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new GenericEventEmitter<T
>(): GenericEventEmitter
<T
>
Type parameters
Name | Type |
---|---|
T | extends EventMap |
Returns
Properties
emitter
• Private
emitter: EventEmitter
Defined in
core/types/GenericEventEmitter.ts:15
Methods
emit
▸ emit<K
>(eventName
, parameter?
): void
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
eventName | K |
parameter? | T [K ] |
Returns
void
Implementation of
Defined in
core/types/GenericEventEmitter.ts:24
off
▸ off<K
>(eventName
, fn
): void
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
eventName | K |
fn | EventReceiver <T [K ]> |
Returns
void
Implementation of
Defined in
core/types/GenericEventEmitter.ts:20
on
▸ on<K
>(eventName
, fn
): void
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
eventName | K |
fn | EventReceiver <T [K ]> |
Returns
void
Implementation of
Defined in
core/types/GenericEventEmitter.ts:16
removeAllListeners
▸ removeAllListeners(): void
Returns
void