1 | var __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 | };
|
6 | import { Subscriber } from 'rxjs/Subscriber';
|
7 | export function enterZone(zone) {
|
8 | return this.lift(new EnterZoneOperator(zone));
|
9 | }
|
10 | export 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 | }());
|
19 | var 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 |
|
\ | No newline at end of file |