mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
20 lines
1010 B
JavaScript
20 lines
1010 B
JavaScript
|
/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */
|
||
|
import { Observable } from '../Observable';
|
||
|
import { Subscription } from '../Subscription';
|
||
|
import { observable as Symbol_observable } from '../symbol/observable';
|
||
|
export function scheduleObservable(input, scheduler) {
|
||
|
return new Observable(function (subscriber) {
|
||
|
var sub = new Subscription();
|
||
|
sub.add(scheduler.schedule(function () {
|
||
|
var observable = input[Symbol_observable]();
|
||
|
sub.add(observable.subscribe({
|
||
|
next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },
|
||
|
error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },
|
||
|
complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },
|
||
|
}));
|
||
|
}));
|
||
|
return sub;
|
||
|
});
|
||
|
}
|
||
|
//# sourceMappingURL=scheduleObservable.js.map
|