@@ -214,7 +214,7 @@ interface Zone {
214
214
/**
215
215
* Execute the Task by restoring the [Zone.currentTask] in the Task's zone.
216
216
*
217
- * @param callback
217
+ * @param task to run
218
218
* @param applyThis
219
219
* @param applyArgs
220
220
* @returns {* }
@@ -310,12 +310,12 @@ interface ZoneType {
310
310
*/
311
311
interface ZoneSpec {
312
312
/**
313
- * The name of the zone. Usefull when debugging Zones.
313
+ * The name of the zone. Useful when debugging Zones.
314
314
*/
315
315
name : string ;
316
316
317
317
/**
318
- * A set of properties to be associated with Zone. Use [Zone.get] to retrive them.
318
+ * A set of properties to be associated with Zone. Use [Zone.get] to retrieve them.
319
319
*/
320
320
properties ?: { [ key : string ] : any } ;
321
321
@@ -325,7 +325,7 @@ interface ZoneSpec {
325
325
* When the zone is being forked, the request is forwarded to this method for interception.
326
326
*
327
327
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
328
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
328
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
329
329
* @param targetZone The [Zone] which originally received the request.
330
330
* @param zoneSpec The argument passed into the `fork` method.
331
331
*/
@@ -337,7 +337,7 @@ interface ZoneSpec {
337
337
* Allows interception of the wrapping of the callback.
338
338
*
339
339
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
340
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
340
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
341
341
* @param targetZone The [Zone] which originally received the request.
342
342
* @param delegate The argument passed into the `warp` method.
343
343
* @param source The argument passed into the `warp` method.
@@ -350,7 +350,7 @@ interface ZoneSpec {
350
350
* Allows interception of the callback invocation.
351
351
*
352
352
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
353
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
353
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
354
354
* @param targetZone The [Zone] which originally received the request.
355
355
* @param delegate The argument passed into the `run` method.
356
356
* @param applyThis The argument passed into the `run` method.
@@ -365,7 +365,7 @@ interface ZoneSpec {
365
365
* Allows interception of the error handling.
366
366
*
367
367
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
368
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
368
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
369
369
* @param targetZone The [Zone] which originally received the request.
370
370
* @param error The argument passed into the `handleError` method.
371
371
*/
@@ -377,7 +377,7 @@ interface ZoneSpec {
377
377
* Allows interception of task scheduling.
378
378
*
379
379
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
380
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
380
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
381
381
* @param targetZone The [Zone] which originally received the request.
382
382
* @param task The argument passed into the `scheduleTask` method.
383
383
*/
@@ -389,10 +389,10 @@ interface ZoneSpec {
389
389
applyThis : any , applyArgs : any ) => any ;
390
390
391
391
/**
392
- * Allows interception of task cancelation .
392
+ * Allows interception of task cancellation .
393
393
*
394
394
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
395
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
395
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
396
396
* @param targetZone The [Zone] which originally received the request.
397
397
* @param task The argument passed into the `cancelTask` method.
398
398
*/
@@ -403,12 +403,13 @@ interface ZoneSpec {
403
403
* Notifies of changes to the task queue empty status.
404
404
*
405
405
* @param parentZoneDelegate Delegate which performs the parent [ZoneSpec] operation.
406
- * @param currentZone The current [Zone] where the current interceptor has beed declared.
406
+ * @param currentZone The current [Zone] where the current interceptor has been declared.
407
407
* @param targetZone The [Zone] which originally received the request.
408
- * @param isEmpty
408
+ * @param hasTaskState
409
409
*/
410
410
onHasTask ?:
411
- ( delegate : ZoneDelegate , current : Zone , target : Zone , hasTaskState : HasTaskState ) => void ;
411
+ ( parentZoneDelegate : ZoneDelegate , currentZone : Zone , targetZone : Zone ,
412
+ hasTaskState : HasTaskState ) => void ;
412
413
}
413
414
414
415
@@ -568,7 +569,7 @@ interface Task {
568
569
569
570
/**
570
571
* Cancel the scheduling request. This method can be called from `ZoneSpec.onScheduleTask` to
571
- * cancel the current scheduling interception. Once canceled the task can be discarted or
572
+ * cancel the current scheduling interception. Once canceled the task can be discarded or
572
573
* rescheduled using `Zone.scheduleTask` on a different zone.
573
574
*/
574
575
cancelScheduleRequest ( ) : void ;
@@ -596,7 +597,7 @@ interface Error {
596
597
zoneAwareStack ?: string ;
597
598
598
599
/**
599
- * Original stack trace with no modiffications
600
+ * Original stack trace with no modifications
600
601
*/
601
602
originalStack ?: string ;
602
603
}
@@ -1090,7 +1091,6 @@ const Zone: ZoneType = (function(global: any) {
1090
1091
eventTask : counts . eventTask > 0 ,
1091
1092
change : type
1092
1093
} ;
1093
- // TODO(misko): what should happen if it throws?
1094
1094
this . hasTask ( this . zone , isEmpty ) ;
1095
1095
}
1096
1096
}
@@ -1206,7 +1206,7 @@ const Zone: ZoneType = (function(global: any) {
1206
1206
1207
1207
function __symbol__ ( name : string ) {
1208
1208
return '__zone_symbol__' + name ;
1209
- } ;
1209
+ }
1210
1210
const symbolSetTimeout = __symbol__ ( 'setTimeout' ) ;
1211
1211
const symbolPromise = __symbol__ ( 'Promise' ) ;
1212
1212
const symbolThen = __symbol__ ( 'then' ) ;
@@ -1579,9 +1579,9 @@ const Zone: ZoneType = (function(global: any) {
1579
1579
if ( resultPromise instanceof ZoneAwarePromise ) {
1580
1580
return resultPromise ;
1581
1581
}
1582
- let Ctor = resultPromise . constructor ;
1583
- if ( ! Ctor [ symbolThenPatched ] ) {
1584
- patchThen ( Ctor ) ;
1582
+ let ctor = resultPromise . constructor ;
1583
+ if ( ! ctor [ symbolThenPatched ] ) {
1584
+ patchThen ( ctor ) ;
1585
1585
}
1586
1586
return resultPromise ;
1587
1587
} ;
@@ -1596,7 +1596,7 @@ const Zone: ZoneType = (function(global: any) {
1596
1596
}
1597
1597
}
1598
1598
1599
- // This is not part of public API, but it is usefull for tests, so we expose it.
1599
+ // This is not part of public API, but it is useful for tests, so we expose it.
1600
1600
( Promise as any ) [ Zone . __symbol__ ( 'uncaughtPromiseErrors' ) ] = _uncaughtPromiseErrors ;
1601
1601
1602
1602
/*
@@ -1775,7 +1775,7 @@ const Zone: ZoneType = (function(global: any) {
1775
1775
} ) ;
1776
1776
1777
1777
// Now we need to populate the `blacklistedStackFrames` as well as find the
1778
- // run/runGuraded /runTask frames. This is done by creating a detect zone and then threading
1778
+ // run/runGuarded /runTask frames. This is done by creating a detect zone and then threading
1779
1779
// the execution through all of the above methods so that we can look at the stack trace and
1780
1780
// find the frames of interest.
1781
1781
let detectZone : Zone = Zone . current . fork ( {
0 commit comments