mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(zone.js): Change the type of _taskCounts to an IndexSignature that can have keys (#51739)
named as the values of the `TaskType` type. The Closure Compiler used at Google has a property renaming optimization that can change the property names when minifying code. Having the correct type helps the TSJS team that develops a tool to identfy property renaming issues directly in TypeScript. Signed-off-by: Costin Sin <sin.costinrobert@gmail.com> PR Close #51739
This commit is contained in:
committed by
Jessica Janiuk
parent
f87a773278
commit
efa7baa976
@@ -1128,7 +1128,7 @@ export function initZone(): ZoneType {
|
||||
}
|
||||
private _zone: ZoneImpl;
|
||||
|
||||
private _taskCounts: {microTask: number; macroTask: number; eventTask: number} = {
|
||||
private _taskCounts: {[key in TaskType]: number} = {
|
||||
'microTask': 0,
|
||||
'macroTask': 0,
|
||||
'eventTask': 0,
|
||||
|
||||
Reference in New Issue
Block a user