@ngrx/core
Version:
Core operators and utiliies for the ngrx platform
31 lines • 1.19 kB
JavaScript
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
import { Subscriber } from 'rxjs/Subscriber';
export function enterZone(zone) {
return this.lift(new EnterZoneOperator(zone));
}
export var EnterZoneOperator = (function () {
function EnterZoneOperator(_zone) {
this._zone = _zone;
}
EnterZoneOperator.prototype.call = function (subscriber, source) {
return source._subscribe(new EnterZoneSubscriber(subscriber, this._zone));
};
return EnterZoneOperator;
}());
var EnterZoneSubscriber = (function (_super) {
__extends(EnterZoneSubscriber, _super);
function EnterZoneSubscriber(destination, _zone) {
_super.call(this, destination);
this._zone = _zone;
}
EnterZoneSubscriber.prototype._next = function (value) {
var _this = this;
this._zone.run(function () { return _this.destination.next(value); });
};
return EnterZoneSubscriber;
}(Subscriber));
//# sourceMappingURL=enterZone.js.map