Skip to content

@k8slens/extensions / Exports / Common / EventBus / EventEmitter

Class: EventEmitter<D>#

Common.EventBus.EventEmitter

Type parameters#

Name Type
D extends any[]

Table of contents#

Constructors#

Properties#

Methods#

Constructors#

constructor#

new EventEmitter<D>()

Type parameters#

Name Type
D extends any[]

Properties#

listeners#

Protected listeners: [EventEmitterCallback<D>, EventEmitterOptions][]

Methods#

addListener#

addListener(callback, options?): void

Parameters#

Name Type
callback EventEmitterCallback<D>
options? EventEmitterOptions

Returns#

void


emit#

emit(...data): void

Parameters#

Name Type
...data D

Returns#

void


removeAllListeners#

removeAllListeners(): void

Returns#

void


removeListener#

removeListener(callback): void

Parameters#

Name Type
callback EventEmitterCallback<D>

Returns#

void