1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult PURE_IMPORTS_END */
import * as tslib_1 from "tslib";
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { subscribeToResult } from '../util/subscribeToResult';
export function skipUntil(notifier) {
return function (source) { return source.lift(new SkipUntilOperator(notifier)); };
}
var SkipUntilOperator = /*@__PURE__*/ (function () {
function SkipUntilOperator(notifier) {
this.notifier = notifier;
}
SkipUntilOperator.prototype.call = function (destination, source) {
return source.subscribe(new SkipUntilSubscriber(destination, this.notifier));
};
return SkipUntilOperator;
}());
var SkipUntilSubscriber = /*@__PURE__*/ (function (_super) {
tslib_1.__extends(SkipUntilSubscriber, _super);
function SkipUntilSubscriber(destination, notifier) {
var _this = _super.call(this, destination) || this;
_this.hasValue = false;
var innerSubscriber = new InnerSubscriber(_this, undefined, undefined);
_this.add(innerSubscriber);
_this.innerSubscription = innerSubscriber;
subscribeToResult(_this, notifier, undefined, undefined, innerSubscriber);
return _this;
}
SkipUntilSubscriber.prototype._next = function (value) {
if (this.hasValue) {
_super.prototype._next.call(this, value);
}
};
SkipUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.hasValue = true;
if (this.innerSubscription) {
this.innerSubscription.unsubscribe();
}
};
SkipUntilSubscriber.prototype.notifyComplete = function () {
};
return SkipUntilSubscriber;
}(OuterSubscriber));
//# sourceMappingURL=skipUntil.js.map