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