SOUTHERNCO\x2mjbyrn 7efe7605b8 Template Upload
2017-05-17 13:45:25 -04:00

37 lines
1.4 KiB
JavaScript

"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function takeUntil(notifier) {
return this.lift(new TakeUntilOperator(notifier));
}
exports.takeUntil = takeUntil;
var TakeUntilOperator = (function () {
function TakeUntilOperator(notifier) {
this.notifier = notifier;
}
TakeUntilOperator.prototype.call = function (subscriber) {
return new TakeUntilSubscriber(subscriber, this.notifier);
};
return TakeUntilOperator;
}());
var TakeUntilSubscriber = (function (_super) {
__extends(TakeUntilSubscriber, _super);
function TakeUntilSubscriber(destination, notifier) {
_super.call(this, destination);
this.notifier = notifier;
this.add(subscribeToResult_1.subscribeToResult(this, notifier));
}
TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this.complete();
};
TakeUntilSubscriber.prototype.notifyComplete = function () {
// noop
};
return TakeUntilSubscriber;
}(OuterSubscriber_1.OuterSubscriber));
//# sourceMappingURL=takeUntil.js.map