Use a for-of loop for a dense array instead of iterating over keys and then indexing

This commit is contained in:
Andy Hanson committed 2016-10-03 08:32:37 -07:00
1 parent 7a1635f2f4
commit fcb4c2ba0f
1 file changed
+1 -2
+1 -2
View File
@@ -2308,8 +2308,7 @@ namespace ts {
extraVariableDeclarations = [];
}
// hoist collected variable declarations
for (const name in currentState.hoistedLocalVariables) {
const identifier = currentState.hoistedLocalVariables[name];
for (const identifier of currentState.hoistedLocalVariables) {
extraVariableDeclarations.push(createVariableDeclaration(identifier));
}
}