1 /** PURE_IMPORTS_START tslib,_innerSubscribe PURE_IMPORTS_END */
2 import * as tslib_1 from "tslib";
3 import { SimpleOuterSubscriber, SimpleInnerSubscriber, innerSubscribe } from '../innerSubscribe';
4 export function skipUntil(notifier) {
5 return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
7 var SkipUntilOperator = /*@__PURE__*/ (function () {
8 function SkipUntilOperator(notifier) {
9 this.notifier = notifier;
11 SkipUntilOperator.prototype.call = function (destination, source) {
12 return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
14 return SkipUntilOperator;
16 var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
17 tslib_1.__extends(SkipUntilSubscriber, _super);
18 function SkipUntilSubscriber(destination, notifier) {
19 var _this = _super.call(this, destination) || this;
20 _this.hasValue = false;
21 var innerSubscriber = new SimpleInnerSubscriber(_this);
22 _this.add(innerSubscriber);
23 _this.innerSubscription = innerSubscriber;
24 var innerSubscription = innerSubscribe(notifier, innerSubscriber);
25 if (innerSubscription !== innerSubscriber) {
26 _this.add(innerSubscription);
27 _this.innerSubscription = innerSubscription;
31 SkipUntilSubscriber.prototype._next = function (value) {
33 _super.prototype._next.call(this, value);
36 SkipUntilSubscriber.prototype.notifyNext = function () {
38 if (this.innerSubscription) {
39 this.innerSubscription.unsubscribe();
42 SkipUntilSubscriber.prototype.notifyComplete = function () {
44 return SkipUntilSubscriber;
45 }(SimpleOuterSubscriber));
46 //# sourceMappingURL=skipUntil.js.map