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