Skip to main content

IEventProvider Interface

Base interface for event providers.

Sealed

This type is "sealed," meaning that code outside of the library defining it should not implement or extend it. Future versions of this type may add members or make typing of readonly members more specific.

Signature​

/** @sealed */
export interface IEventProvider<TEvent extends IEvent>

Type Parameters​

ParameterConstraintDescription
TEventIEvent

Properties​

PropertyModifiersTypeDescription
offreadonlyIEventTransformer<this, TEvent>Removes the corresponding event if it has been registered.
onreadonlyIEventTransformer<this, TEvent>Registers a callback to be invoked when the corresponding event is triggered.
oncereadonlyIEventTransformer<this, TEvent>Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.

Property Details​

off​

Removes the corresponding event if it has been registered.

Signature​

readonly off: IEventTransformer<this, TEvent>;

Type: IEventTransformer<this, TEvent>

on​

Registers a callback to be invoked when the corresponding event is triggered.

Signature​

readonly on: IEventTransformer<this, TEvent>;

Type: IEventTransformer<this, TEvent>

once​

Registers a callback to be invoked the first time (after registration) the corresponding event is triggered.

Signature​

readonly once: IEventTransformer<this, TEvent>;

Type: IEventTransformer<this, TEvent>