wishthis/node_modules/rxjs/dist/cjs/internal/operators/observeOn.js
2022-06-08 12:36:39 +02:00

14 lines
No EOL
981 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.observeOn = void 0;
var executeSchedule_1 = require("../util/executeSchedule");
var lift_1 = require("../util/lift");
var OperatorSubscriber_1 = require("./OperatorSubscriber");
function observeOn(scheduler, delay) {
if (delay === void 0) { delay = 0; }
return lift_1.operate(function (source, subscriber) {
source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function (value) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.next(value); }, delay); }, function () { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.complete(); }, delay); }, function (err) { return executeSchedule_1.executeSchedule(subscriber, scheduler, function () { return subscriber.error(err); }, delay); }));
});
}
exports.observeOn = observeOn;
//# sourceMappingURL=observeOn.js.map