UNPKG

@tempest/core

Version:

The core of the Tempest Stream Library

13 lines 515 B
export class FromObservableSource { constructor(observable) { this.observable = observable; } run(sink, scheduler) { const next = (x) => sink.event(scheduler.now(), x); const error = (e) => sink.error(scheduler.now(), e); const complete = (x) => sink.end(scheduler.now(), x); const subscription = this.observable.subscribe({ next, error, complete }); return { dispose: () => subscription.unsubscribe() }; } } //# sourceMappingURL=fromObservable.js.map