UNPKG

1.89 kBSource Map (JSON)View Raw
1{"version":3,"file":"leaveZone.js","sourceRoot":"","sources":["../../../src/operator/leaveZone.ts"],"names":[],"mappings":";;;;;OACO,EAAE,UAAU,EAAE,MAAM,iBAAiB;AAG5C,0BAA6B,IAA6C;IACxE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC;AAMD;IACE,2BAAoB,KAA8C;QAA9C,UAAK,GAAL,KAAK,CAAyC;IAAI,CAAC;IAEvE,gCAAI,GAAJ,UAAK,UAAyB,EAAE,MAAW;QACzC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,mBAAmB,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5E,CAAC;IACH,wBAAC;AAAD,CAAC,AAND,IAMC;AAED;IAAqC,uCAAa;IAChD,6BAAY,WAA0B,EAAU,KAA8C;QAC5F,kBAAM,WAAW,CAAC,CAAC;QAD2B,UAAK,GAAL,KAAK,CAAyC;IAE9F,CAAC;IAES,mCAAK,GAAf,UAAgB,KAAQ;QAAxB,iBAEC;QADC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,cAAM,OAAA,KAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,EAA5B,CAA4B,CAAC,CAAC;IACnE,CAAC;IACH,0BAAC;AAAD,CAAC,AARD,CAAqC,UAAU,GAQ9C","sourcesContent":["import { Operator } from 'rxjs/Operator';\nimport { Subscriber } from 'rxjs/Subscriber';\nimport { Observable } from 'rxjs/Observable';\n\nexport function leaveZone<T>(zone: { runOutsideAngular: (fn: any) => any }): Observable<T> {\n return this.lift(new LeaveZoneOperator(zone));\n}\n\nexport interface LeaveZoneSignature<T> {\n (zone: { runOutsideAngular: (fn: any) => any }): Observable<T>;\n}\n\nexport class LeaveZoneOperator<T> implements Operator<T, T> {\n constructor(private _zone: { runOutsideAngular: (fn: any) => any }) { }\n\n call(subscriber: Subscriber<T>, source: any): any {\n return source._subscribe(new LeaveZoneSubscriber(subscriber, this._zone));\n }\n}\n\nclass LeaveZoneSubscriber<T> extends Subscriber<T> {\n constructor(destination: Subscriber<T>, private _zone: { runOutsideAngular: (fn: any) => any }) {\n super(destination);\n }\n\n protected _next(value: T) {\n this._zone.runOutsideAngular(() => this.destination.next(value));\n }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
\No newline at end of file