UNPKG

1.19 kBJavaScriptView Raw
1var __extends = (this && this.__extends) || function (d, b) {
2 for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
3 function __() { this.constructor = d; }
4 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5};
6import { Subscriber } from 'rxjs/Subscriber';
7export function enterZone(zone) {
8 return this.lift(new EnterZoneOperator(zone));
9}
10export var EnterZoneOperator = (function () {
11 function EnterZoneOperator(_zone) {
12 this._zone = _zone;
13 }
14 EnterZoneOperator.prototype.call = function (subscriber, source) {
15 return source._subscribe(new EnterZoneSubscriber(subscriber, this._zone));
16 };
17 return EnterZoneOperator;
18}());
19var EnterZoneSubscriber = (function (_super) {
20 __extends(EnterZoneSubscriber, _super);
21 function EnterZoneSubscriber(destination, _zone) {
22 _super.call(this, destination);
23 this._zone = _zone;
24 }
25 EnterZoneSubscriber.prototype._next = function (value) {
26 var _this = this;
27 this._zone.run(function () { return _this.destination.next(value); });
28 };
29 return EnterZoneSubscriber;
30}(Subscriber));
31//# sourceMappingURL=enterZone.js.map
\No newline at end of file