Skip to content

breeze-client / fromBreezeEvent

Function: fromBreezeEvent() ​

fromBreezeEvent<T>(event): Observable<T>

Defined in: src/rxjs/breeze-rxjs.ts:45

Any BreezeEvent as an Observable: each value the event publishes is emitted, for as long as the subscription lasts.

The other functions in this module are this, applied to a particular event. Use it directly for the ones they do not cover - metadataStore.metadataFetched, say.

ts
fromBreezeEvent(em.metadataStore.metadataFetched).subscribe(args => console.log(args.metadata));

An error thrown by a subscriber does not reach Breeze: rxjs reports it on its own, and the event's other subscribers still hear about the change.

Type Parameters ​

T ​

T

Parameters ​

event ​

BreezeEvent<T>

the event to observe

Returns ​

Observable<T>

an Observable that subscribes to event when it is subscribed to, and unsubscribes when it is torn down

Released under the MIT License.