source: trip-planner-front/node_modules/rxjs/_esm5/internal/operators/takeUntil.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.5 KB
Line 
1/** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { innerSubscribe, SimpleInnerSubscriber, SimpleOuterSubscriber } from '../innerSubscribe';
4export function takeUntil(notifier) {
5 return function (source) { return source.lift(new TakeUntilOperator(notifier)); };
6}
7var TakeUntilOperator = /*@__PURE__*/ (function () {
8 function TakeUntilOperator(notifier) {
9 this.notifier = notifier;
10 }
11 TakeUntilOperator.prototype.call = function (subscriber, source) {
12 var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);
13 var notifierSubscription = innerSubscribe(this.notifier, new SimpleInnerSubscriber(takeUntilSubscriber));
14 if (notifierSubscription && !takeUntilSubscriber.seenValue) {
15 takeUntilSubscriber.add(notifierSubscription);
16 return source.subscribe(takeUntilSubscriber);
17 }
18 return takeUntilSubscriber;
19 };
20 return TakeUntilOperator;
21}());
22var TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {
23 tslib_1.__extends(TakeUntilSubscriber, _super);
24 function TakeUntilSubscriber(destination) {
25 var _this = _super.call(this, destination) || this;
26 _this.seenValue = false;
27 return _this;
28 }
29 TakeUntilSubscriber.prototype.notifyNext = function () {
30 this.seenValue = true;
31 this.complete();
32 };
33 TakeUntilSubscriber.prototype.notifyComplete = function () {
34 };
35 return TakeUntilSubscriber;
36}(SimpleOuterSubscriber));
37//# sourceMappingURL=takeUntil.js.map
Note: See TracBrowser for help on using the repository browser.