Skip to main content

TypedEventEmitter Class

Event Emitter helper class the supports emitting typed events. \

This API is provided for existing users, but is not recommended for new users.

To use, import via @fluid-internal/client-utils/legacy.

For more information about our API support guarantees, see here.

Signature

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

Extends: EventEmitter

Implements: IEventProvider<TEvent & IEvent>

Type Parameters

ParameterDescription
TEvent

Constructors

ConstructorAlertsDescription
(constructor)()BetaConstructs a new instance of the TypedEventEmitter class

Properties

PropertyAlertsModifiersTypeDescription
addListenerBetareadonlyTypedEventTransform<this, TEvent>
offBetareadonlyTypedEventTransform<this, TEvent>
onBetareadonlyTypedEventTransform<this, TEvent>
onceBetareadonlyTypedEventTransform<this, TEvent>
prependListenerBetareadonlyTypedEventTransform<this, TEvent>
prependOnceListenerBetareadonlyTypedEventTransform<this, TEvent>
removeListenerBetareadonlyTypedEventTransform<this, TEvent>

Constructor Details

(constructor)

Constructs a new instance of the TypedEventEmitter class

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

constructor();

Property Details

addListener

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly addListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

off

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly off: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

on

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly on: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

once

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly once: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

prependListener

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly prependListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

prependOnceListener

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly prependOnceListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>

removeListener

This API is provided for existing users, but is not recommended for new users.

For more information about our API support guarantees, see here.

Signature

readonly removeListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform<this, TEvent>