source: trip-planner-front/node_modules/rxjs/internal/operators/takeUntil.js@ eed0bf8

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

initial commit

  • Property mode set to 100644
File size: 2.1 KB
Line 
1"use strict";
2var __extends = (this && this.__extends) || (function () {
3 var extendStatics = function (d, b) {
4 extendStatics = Object.setPrototypeOf ||
5 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7 return extendStatics(d, b);
8 }
9 return function (d, b) {
10 extendStatics(d, b);
11 function __() { this.constructor = d; }
12 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13 };
14})();
15Object.defineProperty(exports, "__esModule", { value: true });
16var innerSubscribe_1 = require("../innerSubscribe");
17function takeUntil(notifier) {
18 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
19}
20exports.takeUntil = takeUntil;
21var TakeUntilOperator = (function () {
22 function TakeUntilOperator(notifier) {
23 this.notifier = notifier;
24 }
25 TakeUntilOperator.prototype.call = function (subscriber, source) {
26 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
27 var notifierSubscription = innerSubscribe_1.innerSubscribe(this.notifier, new innerSubscribe_1.SimpleInnerSubscriber(takeUntilSubscriber));
28 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
29 takeUntilSubscriber.add(notifierSubscription);
30 return source.subscribe(takeUntilSubscriber);
31 }
32 return takeUntilSubscriber;
33 };
34 return TakeUntilOperator;
35}());
36var TakeUntilSubscriber = (function (_super) {
37 __extends(TakeUntilSubscriber, _super);
38 function TakeUntilSubscriber(destination) {
39 var _this = _super.call(this, destination) || this;
40 _this.seenValue = false;
41 return _this;
42 }
43 TakeUntilSubscriber.prototype.notifyNext = function () {
44 this.seenValue = true;
45 this.complete();
46 };
47 TakeUntilSubscriber.prototype.notifyComplete = function () {
48 };
49 return TakeUntilSubscriber;
50}(innerSubscribe_1.SimpleOuterSubscriber));
51//# sourceMappingURL=takeUntil.js.map
Note: See TracBrowser for help on using the repository browser.