Skip to content

Commit a6a6a0e

Browse files
More usage of for-of
1 parent 29bfc15 commit a6a6a0e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/compiler/checker.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4086,8 +4086,7 @@ module ts {
40864086
outer: for (let t of targetSignatures) {
40874087
if (!t.hasStringLiterals || target.flags & TypeFlags.FromSignature) {
40884088
var localErrors = reportErrors;
4089-
for (var j = 0; j < sourceSignatures.length; j++) {
4090-
var s = sourceSignatures[j];
4089+
for (let s of sourceSignatures) {
40914090
if (!s.hasStringLiterals || source.flags & TypeFlags.FromSignature) {
40924091
var related = signatureRelatedTo(s, t, localErrors);
40934092
if (related) {
@@ -10042,16 +10041,14 @@ module ts {
1004210041
var declarations = moduleSymbol.declarations;
1004310042
for (var i = 0; i < declarations.length; i++) {
1004410043
var statements = getModuleStatements(declarations[i]);
10045-
for (var j = 0; j < statements.length; j++) {
10046-
var node = statements[j];
10044+
for (let node of statements) {
1004710045
if (node.kind === SyntaxKind.ExportDeclaration) {
1004810046
var exportClause = (<ExportDeclaration>node).exportClause;
1004910047
if (!exportClause) {
1005010048
return true;
1005110049
}
1005210050
var specifiers = exportClause.elements;
10053-
for (var k = 0; k < specifiers.length; k++) {
10054-
var specifier = specifiers[k];
10051+
for (let specifier of specifiers) {
1005510052
if (!(specifier.propertyName && specifier.name && specifier.name.text === "default")) {
1005610053
return true;
1005710054
}

0 commit comments

Comments
 (0)