PURISTA API / Modules / @purista/core / IEmitter
Interface: IEmitter<T>
@purista/core.IEmitter
Type parameters
Name | Type |
---|---|
T | extends EventMap |
Implemented by
Table of contents
Methods
Methods
emit
▸ emit<K
>(eventName
, parameter?
): void
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
eventName | K |
parameter? | T [K ] |
Returns
void
Defined in
core/types/GenericEventEmitter.ts:11
off
▸ off<K
>(eventName
, fn
): void
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
eventName | K |
fn | EventReceiver <T [K ]> |
Returns
void
Defined in
core/types/GenericEventEmitter.ts:10
on
▸ on<K
>(eventName
, fn
): void
Type parameters
Name | Type |
---|---|
K | extends string |
Parameters
Name | Type |
---|---|
eventName | K |
fn | EventReceiver <T [K ]> |
Returns
void