UI for Zipcoin Blue

InnerSubscriber.js 1.3KB

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. var __extends = (this && this.__extends) || function (d, b) {
  3. for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
  4. function __() { this.constructor = d; }
  5. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  6. };
  7. var Subscriber_1 = require('./Subscriber');
  8. /**
  9. * We need this JSDoc comment for affecting ESDoc.
  10. * @ignore
  11. * @extends {Ignored}
  12. */
  13. var InnerSubscriber = (function (_super) {
  14. __extends(InnerSubscriber, _super);
  15. function InnerSubscriber(parent, outerValue, outerIndex) {
  16. _super.call(this);
  17. this.parent = parent;
  18. this.outerValue = outerValue;
  19. this.outerIndex = outerIndex;
  20. this.index = 0;
  21. }
  22. InnerSubscriber.prototype._next = function (value) {
  23. this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);
  24. };
  25. InnerSubscriber.prototype._error = function (error) {
  26. this.parent.notifyError(error, this);
  27. this.unsubscribe();
  28. };
  29. InnerSubscriber.prototype._complete = function () {
  30. this.parent.notifyComplete(this);
  31. this.unsubscribe();
  32. };
  33. return InnerSubscriber;
  34. }(Subscriber_1.Subscriber));
  35. exports.InnerSubscriber = InnerSubscriber;
  36. //# sourceMappingURL=InnerSubscriber.js.map