source: trip-planner-front/node_modules/rxjs/_esm5/internal/observable/SubscribeOnObservable.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/** PURE_IMPORTS_START tslib,_Observable,_scheduler_asap,_util_isNumeric PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { Observable } from '../Observable';
4import { asap } from '../scheduler/asap';
5import { isNumeric } from '../util/isNumeric';
6var SubscribeOnObservable = /*@__PURE__*/ (function (_super) {
7 tslib_1.__extends(SubscribeOnObservable, _super);
8 function SubscribeOnObservable(source, delayTime, scheduler) {
9 if (delayTime === void 0) {
10 delayTime = 0;
11 }
12 if (scheduler === void 0) {
13 scheduler = asap;
14 }
15 var _this = _super.call(this) || this;
16 _this.source = source;
17 _this.delayTime = delayTime;
18 _this.scheduler = scheduler;
19 if (!isNumeric(delayTime) || delayTime < 0) {
20 _this.delayTime = 0;
21 }
22 if (!scheduler || typeof scheduler.schedule !== 'function') {
23 _this.scheduler = asap;
24 }
25 return _this;
26 }
27 SubscribeOnObservable.create = function (source, delay, scheduler) {
28 if (delay === void 0) {
29 delay = 0;
30 }
31 if (scheduler === void 0) {
32 scheduler = asap;
33 }
34 return new SubscribeOnObservable(source, delay, scheduler);
35 };
36 SubscribeOnObservable.dispatch = function (arg) {
37 var source = arg.source, subscriber = arg.subscriber;
38 return this.add(source.subscribe(subscriber));
39 };
40 SubscribeOnObservable.prototype._subscribe = function (subscriber) {
41 var delay = this.delayTime;
42 var source = this.source;
43 var scheduler = this.scheduler;
44 return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
45 source: source, subscriber: subscriber
46 });
47 };
48 return SubscribeOnObservable;
49}(Observable));
50export { SubscribeOnObservable };
51//# sourceMappingURL=SubscribeOnObservable.js.map
Note: See TracBrowser for help on using the repository browser.