UNPKG

1.2 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 leaveZone(zone) {
8 return this.lift(new LeaveZoneOperator(zone));
9}
10export var LeaveZoneOperator = (function () {
11 function LeaveZoneOperator(_zone) {
12 this._zone = _zone;
13 }
14 LeaveZoneOperator.prototype.call = function (subscriber, source) {
15 return source._subscribe(new LeaveZoneSubscriber(subscriber, this._zone));
16 };
17 return LeaveZoneOperator;
18}());
19var LeaveZoneSubscriber = (function (_super) {
20 __extends(LeaveZoneSubscriber, _super);
21 function LeaveZoneSubscriber(destination, _zone) {
22 _super.call(this, destination);
23 this._zone = _zone;
24 }
25 LeaveZoneSubscriber.prototype._next = function (value) {
26 var _this = this;
27 this._zone.runOutsideAngular(function () { return _this.destination.next(value); });
28 };
29 return LeaveZoneSubscriber;
30}(Subscriber));
31//# sourceMappingURL=leaveZone.js.map
\No newline at end of file