Skip to main content

IEventProvider Interface

Base interface for event providers.

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.

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>