Interface: Emitter<EventMap>
A typed EventEmitter with events defined by BroadcastClientEventPayloads.
Type parameters
Name |
---|
EventMap |
Properties
_events
• Optional
_events: Object
Index signature
▪ [Key: string
]: Callback
| Callback
[]
Methods
emit
▸ emit<Key
>(event
, params
): void
Type parameters
Name | Type |
---|---|
Key | extends string | number | symbol |
Parameters
Name | Type |
---|---|
event | Key |
params | EventMap [Key ] |
Returns
void
▸ emit<Key
, Params
>(event
, params?
): void
Type parameters
Name | Type |
---|---|
Key | extends string |
Params | Params |
Parameters
Name | Type |
---|---|
event | Key |
params? | Params |
Returns
void
off
▸ off<Key
>(event
, callback
, context?
): void
Type parameters
Name | Type |
---|---|
Key | extends string | number | symbol |
Parameters
Name | Type |
---|---|
event | Key |
callback | (value : EventMap [Key ]) => void |
context? | object |
Returns
void
▸ off<Key
>(event
, callback
, context?
): void
Type parameters
Name | Type |
---|---|
Key | extends string |
Parameters
Name | Type |
---|---|
event | Key |
callback | Callback |
context? | object |
Returns
void
on
▸ on<Key
>(event
, callback
, context?
): void
Type parameters
Name | Type |
---|---|
Key | extends string | number | symbol |
Parameters
Name | Type |
---|---|
event | Key |
callback | (value : EventMap [Key ]) => void |
context? | object |
Returns
void
▸ on<Key
>(event
, callback
, context?
): void
Type parameters
Name | Type |
---|---|
Key | extends string |
Parameters
Name | Type |
---|---|
event | Key |
callback | Callback |
context? | object |
Returns
void
removeAllListeners
▸ removeAllListeners(): void
Returns
void