EventBus
Custom eventing bus that abstracts common patterns between events.
Constructor Summary
Public Constructor | ||
public |
Creates an instance of EventBus. |
Method Summary
Public Methods | ||
public |
next(event: T) Dispatches an event. |
|
public |
scope(Event: Type<T>): Observable<T> Creates an observable scoped to a specific event type. |
|
public |
subscribe(Event: Type<T>, observer: PartialObserver<T> | ((event: T) => void)): Subscription Subscribes to a specific event type. |
Public Constructors
Public Methods
public scope(Event: Type<T>): Observable<T> source
Creates an observable scoped to a specific event type.
Params:
Name | Type | Attribute | Description |
Event | Type<T> |
public subscribe(Event: Type<T>, observer: PartialObserver<T> | ((event: T) => void)): Subscription source
Subscribes to a specific event type.
Params:
Name | Type | Attribute | Description |
Event | Type<T> | ||
observer | PartialObserver<T> | ((event: T) => void) |