Skip to main content
Version: v1.18.0

Interface: Emitter\<EventMap>

A typed [[EventEmitter]] with events defined by [[BroadcastClientEventPayloads]].

Type Parameters

EventMap

Properties

_events?

optional _events: object

Index Signature

[Key: string]: Callback | Callback[]

Methods

emit()

emit(event, params)

emit\<Key>(event, params): void

Type Parameters

Key extends string | number | symbol

Parameters

event: Key

params: EventMap[Key]

Returns

void

emit(event, params)

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

Type Parameters

Key extends string

Params

Parameters

event: Key

params?: Params

Returns

void


off()

off(event, callback, context)

off\<Key>(event, callback, context?): void

Type Parameters

Key extends string | number | symbol

Parameters

event: Key

callback

context?: object

Returns

void

off(event, callback, context)

off\<Key>(event, callback, context?): void

Type Parameters

Key extends string

Parameters

event: Key

callback: Callback

context?: object

Returns

void


on()

on(event, callback, context)

on\<Key>(event, callback, context?): void

Type Parameters

Key extends string | number | symbol

Parameters

event: Key

callback

context?: object

Returns

void

on(event, callback, context)

on\<Key>(event, callback, context?): void

Type Parameters

Key extends string

Parameters

event: Key

callback: Callback

context?: object

Returns

void


removeAllListeners()

removeAllListeners(): void

Returns

void