source: trip-planner-front/node_modules/rxjs/_esm5/internal/testing/ColdObservable.js@ 59329aa

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

initial commit

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/** PURE_IMPORTS_START tslib,_Observable,_Subscription,_SubscriptionLoggable,_util_applyMixins PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { Observable } from '../Observable';
4import { Subscription } from '../Subscription';
5import { SubscriptionLoggable } from './SubscriptionLoggable';
6import { applyMixins } from '../util/applyMixins';
7var ColdObservable = /*@__PURE__*/ (function (_super) {
8 tslib_1.__extends(ColdObservable, _super);
9 function ColdObservable(messages, scheduler) {
10 var _this = _super.call(this, function (subscriber) {
11 var observable = this;
12 var index = observable.logSubscribedFrame();
13 var subscription = new Subscription();
14 subscription.add(new Subscription(function () {
15 observable.logUnsubscribedFrame(index);
16 }));
17 observable.scheduleMessages(subscriber);
18 return subscription;
19 }) || this;
20 _this.messages = messages;
21 _this.subscriptions = [];
22 _this.scheduler = scheduler;
23 return _this;
24 }
25 ColdObservable.prototype.scheduleMessages = function (subscriber) {
26 var messagesLength = this.messages.length;
27 for (var i = 0; i < messagesLength; i++) {
28 var message = this.messages[i];
29 subscriber.add(this.scheduler.schedule(function (_a) {
30 var message = _a.message, subscriber = _a.subscriber;
31 message.notification.observe(subscriber);
32 }, message.frame, { message: message, subscriber: subscriber }));
33 }
34 };
35 return ColdObservable;
36}(Observable));
37export { ColdObservable };
38/*@__PURE__*/ applyMixins(ColdObservable, [SubscriptionLoggable]);
39//# sourceMappingURL=ColdObservable.js.map
Note: See TracBrowser for help on using the repository browser.