source: trip-planner-front/node_modules/rxjs/_esm5/internal/innerSubscribe.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 3.6 KB
Line 
1/** PURE_IMPORTS_START tslib,_Subscriber,_Observable,_util_subscribeTo PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { Subscriber } from './Subscriber';
4import { Observable } from './Observable';
5import { subscribeTo } from './util/subscribeTo';
6var 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;
11 return _this;
12 }
13 SimpleInnerSubscriber.prototype._next = function (value) {
14 this.parent.notifyNext(value);
15 };
16 SimpleInnerSubscriber.prototype._error = function (error) {
17 this.parent.notifyError(error);
18 this.unsubscribe();
19 };
20 SimpleInnerSubscriber.prototype._complete = function () {
21 this.parent.notifyComplete();
22 this.unsubscribe();
23 };
24 return SimpleInnerSubscriber;
25}(Subscriber));
26export { SimpleInnerSubscriber };
27var 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;
34 return _this;
35 }
36 ComplexInnerSubscriber.prototype._next = function (value) {
37 this.parent.notifyNext(this.outerValue, value, this.outerIndex, this);
38 };
39 ComplexInnerSubscriber.prototype._error = function (error) {
40 this.parent.notifyError(error);
41 this.unsubscribe();
42 };
43 ComplexInnerSubscriber.prototype._complete = function () {
44 this.parent.notifyComplete(this);
45 this.unsubscribe();
46 };
47 return ComplexInnerSubscriber;
48}(Subscriber));
49export { ComplexInnerSubscriber };
50var SimpleOuterSubscriber = /*@__PURE__*/ (function (_super) {
51 tslib_1.__extends(SimpleOuterSubscriber, _super);
52 function SimpleOuterSubscriber() {
53 return _super !== null && _super.apply(this, arguments) || this;
54 }
55 SimpleOuterSubscriber.prototype.notifyNext = function (innerValue) {
56 this.destination.next(innerValue);
57 };
58 SimpleOuterSubscriber.prototype.notifyError = function (err) {
59 this.destination.error(err);
60 };
61 SimpleOuterSubscriber.prototype.notifyComplete = function () {
62 this.destination.complete();
63 };
64 return SimpleOuterSubscriber;
65}(Subscriber));
66export { SimpleOuterSubscriber };
67var ComplexOuterSubscriber = /*@__PURE__*/ (function (_super) {
68 tslib_1.__extends(ComplexOuterSubscriber, _super);
69 function ComplexOuterSubscriber() {
70 return _super !== null && _super.apply(this, arguments) || this;
71 }
72 ComplexOuterSubscriber.prototype.notifyNext = function (_outerValue, innerValue, _outerIndex, _innerSub) {
73 this.destination.next(innerValue);
74 };
75 ComplexOuterSubscriber.prototype.notifyError = function (error) {
76 this.destination.error(error);
77 };
78 ComplexOuterSubscriber.prototype.notifyComplete = function (_innerSub) {
79 this.destination.complete();
80 };
81 return ComplexOuterSubscriber;
82}(Subscriber));
83export { ComplexOuterSubscriber };
84export function innerSubscribe(result, innerSubscriber) {
85 if (innerSubscriber.closed) {
86 return undefined;
87 }
88 if (result instanceof Observable) {
89 return result.subscribe(innerSubscriber);
90 }
91 var subscription;
92 try {
93 subscription = subscribeTo(result)(innerSubscriber);
94 }
95 catch (error) {
96 innerSubscriber.error(error);
97 }
98 return subscription;
99}
100//# sourceMappingURL=innerSubscribe.js.map
Note: See TracBrowser for help on using the repository browser.