1 /** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */
2 import * as tslib_1 from "tslib";
3 import { Subscription } from './Subscription';
4 var 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;
13 SubjectSubscription.prototype.unsubscribe = function () {
18 var subject = this.subject;
19 var observers = subject.observers;
21 if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {
24 var subscriberIndex = observers.indexOf(this.subscriber);
25 if (subscriberIndex !== -1) {
26 observers.splice(subscriberIndex, 1);
29 return SubjectSubscription;
31 export { SubjectSubscription };
32 //# sourceMappingURL=SubjectSubscription.js.map