Skip to main content
Version: v1.19.0

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
ParameterType
eventKey
paramsEventMap[Key]
Returns

void

emit(event, params)

emit<Key, Params>(event, params?): void

Type Parameters
Type Parameter
Key extends string
Params
Parameters
ParameterType
eventKey
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
ParameterType
eventKey
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
ParameterType
eventKey
callbackCallback
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
ParameterType
eventKey
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
ParameterType
eventKey
callbackCallback
context?object
Returns

void


removeAllListeners()

removeAllListeners(): void

Returns

void