Skip to main content

TypedEventEmitter Class

Event Emitter helper class the supports emitting typed events.

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

export declare class TypedEventEmitter<TEvent> extends EventEmitter implements IEventProvider<TEvent & IEvent>

Extends: EventEmitter

Implements: IEventProvider<TEvent & IEvent>

Type Parameters

Parameter Description
TEvent

Constructors

Constructor Alerts Description
(constructor)() Alpha Constructs a new instance of the TypedEventEmitter class

Properties

Property Alerts Modifiers Type Description
addListener Alpha readonly TypedEventTransform<this, TEvent>
off Alpha readonly TypedEventTransform<this, TEvent>
on Alpha readonly TypedEventTransform<this, TEvent>
once Alpha readonly TypedEventTransform<this, TEvent>
prependListener Alpha readonly TypedEventTransform<this, TEvent>
prependOnceListener Alpha readonly TypedEventTransform<this, TEvent>
removeListener Alpha readonly TypedEventTransform<this, TEvent>

Constructor Details

(constructor)

Constructs a new instance of the TypedEventEmitter class

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

constructor();

Property Details

addListener

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly addListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

off

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly off: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

on

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly on: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

once

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly once: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

prependListener

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly prependListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

prependOnceListener

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly prependOnceListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

removeListener

WARNING: This API is provided as an alpha preview and may change without notice. Use at your own risk.

Signature

readonly removeListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>