1 /** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_util_subscribeTo PURE_IMPORTS_END */
2 import * as tslib_1 from "tslib";
3 import { Subscriber } from './Subscriber';
4 import { Observable } from './Observable';
5 import { subscribeTo } from './util/subscribeTo';
6 var SimpleInnerSubscriber = /*@__PURE__*/ (function (_super) {
7 tslib_1.__extends(SimpleInnerSubscriber, _super);
8 function SimpleInnerSubscriber(parent) {
9 var _this = _super.call(this) || this;
10 _this.parent = parent;
13 SimpleInnerSubscriber.prototype._next = function (value) {
14 this.parent.notifyNext(value);
16 SimpleInnerSubscriber.prototype._error = function (error) {
17 this.parent.notifyError(error);
20 SimpleInnerSubscriber.prototype._complete = function () {
21 this.parent.notifyComplete();
24 return SimpleInnerSubscriber;
26 export { SimpleInnerSubscriber };
27 var ComplexInnerSubscriber = /*@__PURE__*/ (function (_super) {
28 tslib_1.__extends(ComplexInnerSubscriber, _super);
29 function ComplexInnerSubscriber(parent, outerValue, outerIndex) {
30 var _this = _super.call(this) || this;
31 _this.parent = parent;
32 _this.outerValue = outerValue;
33 _this.outerIndex = outerIndex;
36 ComplexInnerSubscriber.prototype._next = function (value) {
37 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);
39 ComplexInnerSubscriber.prototype._error = function (error) {
40 this.parent.notifyError(error);
43 ComplexInnerSubscriber.prototype._complete = function () {
44 this.parent.notifyComplete(this);
47 return ComplexInnerSubscriber;
49 export { ComplexInnerSubscriber };
50 var SimpleOuterSubscriber = /*@__PURE__*/ (function (_super) {
51 tslib_1.__extends(SimpleOuterSubscriber, _super);
52 function SimpleOuterSubscriber() {
53 return _super !== null && _super.apply(this, arguments) || this;
55 SimpleOuterSubscriber.prototype.notifyNext = function (innerValue) {
56 this.destination.next(innerValue);
58 SimpleOuterSubscriber.prototype.notifyError = function (err) {
59 this.destination.error(err);
61 SimpleOuterSubscriber.prototype.notifyComplete = function () {
62 this.destination.complete();
64 return SimpleOuterSubscriber;
66 export { SimpleOuterSubscriber };
67 var ComplexOuterSubscriber = /*@__PURE__*/ (function (_super) {
68 tslib_1.__extends(ComplexOuterSubscriber, _super);
69 function ComplexOuterSubscriber() {
70 return _super !== null && _super.apply(this, arguments) || this;
72 ComplexOuterSubscriber.prototype.notifyNext = function (_outerValue, innerValue, _outerIndex, _innerSub) {
73 this.destination.next(innerValue);
75 ComplexOuterSubscriber.prototype.notifyError = function (error) {
76 this.destination.error(error);
78 ComplexOuterSubscriber.prototype.notifyComplete = function (_innerSub) {
79 this.destination.complete();
81 return ComplexOuterSubscriber;
83 export { ComplexOuterSubscriber };
84 export function innerSubscribe(result, innerSubscriber) {
85 if (innerSubscriber.closed) {
88 if (result instanceof Observable) {
89 return result.subscribe(innerSubscriber);
91 return subscribeTo(result)(innerSubscriber);
93 //# sourceMappingURL=innerSubscribe.js.map