work.suroh.tk/node_modules/rxjs/SubjectSubscription.js.map

1 line
1.8 KiB
Plaintext
Raw Normal View History

2019-12-02 12:22:45 +00:00
{"version":3,"file":"SubjectSubscription.js","sourceRoot":"","sources":["../src/SubjectSubscription.ts"],"names":[],"mappings":";;;;;;AAEA,6BAA6B,gBAAgB,CAAC,CAAA;AAE9C;;;;GAIG;AACH;IAA4C,uCAAY;IAGtD,6BAAmB,OAAmB,EAAS,UAAuB;QACpE,iBAAO,CAAC;QADS,YAAO,GAAP,OAAO,CAAY;QAAS,eAAU,GAAV,UAAU,CAAa;QAFtE,WAAM,GAAY,KAAK,CAAC;IAIxB,CAAC;IAED,yCAAW,GAAX;QACE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;YAChB,MAAM,CAAC;QACT,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QAEnB,IAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QAEpC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QAEpB,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;YAChF,MAAM,CAAC;QACT,CAAC;QAED,IAAM,eAAe,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAE3D,EAAE,CAAC,CAAC,eAAe,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3B,SAAS,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;IACH,0BAAC;AAAD,CAAC,AA7BD,CAA4C,2BAAY,GA6BvD;AA7BY,2BAAmB,sBA6B/B,CAAA","sourcesContent":["import { Subject } from './Subject';\nimport { Observer } from './Observer';\nimport { Subscription } from './Subscription';\n\n/**\n * We need this JSDoc comment for affecting ESDoc.\n * @ignore\n * @extends {Ignored}\n */\nexport class SubjectSubscription<T> extends Subscription {\n closed: boolean = false;\n\n constructor(public subject: Subject<T>, public subscriber: Observer<T>) {\n super();\n }\n\n unsubscribe() {\n if (this.closed) {\n return;\n }\n\n this.closed = true;\n\n const subject = this.subject;\n const observers = subject.observers;\n\n this.subject = null;\n\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n\n const subscriberIndex = observers.indexOf(this.subscriber);\n\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n }\n}\n"]}