Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

skipUntil.js 1.8KB

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