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

Parameter Constraint Description
TEvent IEvent

Properties

Property Modifiers Type Description
off readonly IEventTransformer<this, TEvent> Removes the corresponding event if it has been registered.
on readonly IEventTransformer<this, TEvent> Registers a callback to be invoked when the corresponding event is triggered.
once readonly IEventTransformer<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.

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
readonly off: IEventTransformer<this, TEvent>;

Type: IEventTransformer<this, TEvent>

on

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

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
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.

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
readonly once: IEventTransformer<this, TEvent>;

Type: IEventTransformer<this, TEvent>