TypedEventEmitter Class

Packages > @fluid-internal/client-utils > TypedEventEmitter

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

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

This API is provided as an alpha preview and may change without notice.

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

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

Signature

constructor();

Property Details

addListener

This API is provided as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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 as an alpha preview and may change without notice.

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

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

Signature

readonly removeListener: TypedEventTransform<this, TEvent>;

Type: TypedEventTransform <this, TEvent>