source: trip-planner-front/node_modules/rxjs/_esm5/internal/SubjectSubscription.js@ eed0bf8

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

initial commit

  • Property mode set to 100644
File size: 1.1 KB
Line 
1/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
2import * as tslib_1 from "tslib";
3import { Subscription } from './Subscription';
4var SubjectSubscription = /*@__PURE__*/ (function (_super) {
5 tslib_1.__extends(SubjectSubscription, _super);
6 function SubjectSubscription(subject, subscriber) {
7 var _this = _super.call(this) || this;
8 _this.subject = subject;
9 _this.subscriber = subscriber;
10 _this.closed = false;
11 return _this;
12 }
13 SubjectSubscription.prototype.unsubscribe = function () {
14 if (this.closed) {
15 return;
16 }
17 this.closed = true;
18 var subject = this.subject;
19 var observers = subject.observers;
20 this.subject = null;
21 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
22 return;
23 }
24 var subscriberIndex = observers.indexOf(this.subscriber);
25 if (subscriberIndex !== -1) {
26 observers.splice(subscriberIndex, 1);
27 }
28 };
29 return SubjectSubscription;
30}(Subscription));
31export { SubjectSubscription };
32//# sourceMappingURL=SubjectSubscription.js.map
Note: See TracBrowser for help on using the repository browser.