@@ -77,35 +77,7 @@ export interface NgZoneZone extends Zone { _innerZone: boolean; }
7777 * }
7878 * ```
7979 */
80- export abstract class NgZone {
81- /**
82- * Executes the `fn` function synchronously within the Angular zone and returns value returned by
83- * the function.
84- *
85- * Running functions via `run` allows you to reenter Angular zone from a task that was executed
86- * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
87- *
88- * Any future tasks or microtasks scheduled from within this function will continue executing from
89- * within the Angular zone.
90- */
91- abstract run ( fn : ( ) => any ) : any ;
92-
93- /**
94- * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
95- * the function.
96- *
97- * Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that
98- * doesn't trigger Angular change-detection or is subject to Angular's error handling.
99- *
100- * Any future tasks or microtasks scheduled from within this function will continue executing from
101- * outside of the Angular zone.
102- *
103- * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
104- */
105- abstract runOutsideAngular ( fn : ( ) => any ) : any ;
106- }
107-
108- export class NgZone_ extends NgZone {
80+ export class NgZone {
10981 _runScope : WtfScopeFn = wtfCreateScope ( `NgZone#run()` ) ;
11082 _microtaskScope : WtfScopeFn = wtfCreateScope ( `NgZone#microtask()` ) ;
11183
@@ -143,7 +115,6 @@ export class NgZone_ extends NgZone {
143115 * enabled in development mode as they significantly impact perf.
144116 */
145117 constructor ( { enableLongStackTrace} ) {
146- super ( ) ;
147118 this . _onTurnStart = null ;
148119 this . _onTurnDone = null ;
149120 this . _onEventDone = null ;
@@ -222,6 +193,16 @@ export class NgZone_ extends NgZone {
222193 this . _onErrorHandler = normalizeBlank ( errorHandler ) ;
223194 }
224195
196+ /**
197+ * Executes the `fn` function synchronously within the Angular zone and returns value returned by
198+ * the function.
199+ *
200+ * Running functions via `run` allows you to reenter Angular zone from a task that was executed
201+ * outside of the Angular zone (typically started via {@link #runOutsideAngular}).
202+ *
203+ * Any future tasks or microtasks scheduled from within this function will continue executing from
204+ * within the Angular zone.
205+ */
225206 run ( fn : ( ) => any ) : any {
226207 if ( this . _disabled ) {
227208 return fn ( ) ;
@@ -235,6 +216,18 @@ export class NgZone_ extends NgZone {
235216 }
236217 }
237218
219+ /**
220+ * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by
221+ * the function.
222+ *
223+ * Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that
224+ * doesn't trigger Angular change-detection or is subject to Angular's error handling.
225+ *
226+ * Any future tasks or microtasks scheduled from within this function will continue executing from
227+ * outside of the Angular zone.
228+ *
229+ * Use {@link #run} to reenter the Angular zone and do work that updates the application model.
230+ */
238231 runOutsideAngular ( fn : ( ) => any ) : any {
239232 if ( this . _disabled ) {
240233 return fn ( ) ;
0 commit comments