This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/rxjs/internal/scheduled/schedulePromise.js
2019-08-11 20:48:02 +02:00

20 lines
No EOL
869 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Observable_1 = require("../Observable");
var Subscription_1 = require("../Subscription");
function schedulePromise(input, scheduler) {
return new Observable_1.Observable(function (subscriber) {
var sub = new Subscription_1.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;
});
}
exports.schedulePromise = schedulePromise;
//# sourceMappingURL=schedulePromise.js.map