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
): void
Type parameters
Name | Type |
---|---|
Key | extends string | number | symbol |
Parameters
Name | Type |
---|---|
event | Key |
callback | (value : EventMap [Key ]) => void |
Returns
void
▸ off<Key
>(event
, callback
): void
Type parameters
Name | Type |
---|---|
Key | extends string |
Parameters
Name | Type |
---|---|
event | Key |
callback | Callback |
Returns
void
on
▸ on<Key
>(event
, callback
): void
Type parameters
Name | Type |
---|---|
Key | extends string | number | symbol |
Parameters
Name | Type |
---|---|
event | Key |
callback | (value : EventMap [Key ]) => void |
Returns
void
▸ on<Key
>(event
, callback
): void
Type parameters
Name | Type |
---|---|
Key | extends string |
Parameters
Name | Type |
---|---|
event | Key |
callback | Callback |
Returns
void