@@ -5042,7 +5042,7 @@ namespace ts {
50425042 // If this is a JSDoc construct signature, then skip the first parameter in the
50435043 // parameter list. The first parameter represents the return type of the construct
50445044 // signature.
5045- for (let i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n ; i++) {
5045+ for (let i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {
50465046 const param = declaration.parameters[i];
50475047
50485048 let paramSymbol = param.symbol;
@@ -5141,7 +5141,7 @@ namespace ts {
51415141 function getSignaturesOfSymbol(symbol: Symbol): Signature[] {
51425142 if (!symbol) return emptyArray;
51435143 const result: Signature[] = [];
5144- for (let i = 0, len = symbol.declarations.length; i < len ; i++) {
5144+ for (let i = 0; i < symbol.declarations.length; i++) {
51455145 const node = symbol.declarations[i];
51465146 switch (node.kind) {
51475147 case SyntaxKind.FunctionType:
@@ -5791,8 +5791,8 @@ namespace ts {
57915791 }
57925792
57935793 function isSubtypeOfAny(candidate: Type, types: Type[]): boolean {
5794- for (let i = 0, len = types.length; i < len; i++ ) {
5795- if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i] )) {
5794+ for (const type of types) {
5795+ if (candidate !== type && isTypeSubtypeOf(candidate, type )) {
57965796 return true;
57975797 }
57985798 }
@@ -7945,7 +7945,7 @@ namespace ts {
79457945 return Ternary.False;
79467946 }
79477947 let result = Ternary.True;
7948- for (let i = 0, len = sourceSignatures.length ; i < len ; i++) {
7948+ for (let i = 0; i < sourceSignatures.length ; i++) {
79497949 const related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false, isRelatedTo);
79507950 if (!related) {
79517951 return Ternary.False;
@@ -18093,7 +18093,7 @@ namespace ts {
1809318093 /** Check each type parameter and check that type parameters have no duplicate type parameter declarations */
1809418094 function checkTypeParameters(typeParameterDeclarations: TypeParameterDeclaration[]) {
1809518095 if (typeParameterDeclarations) {
18096- for (let i = 0, n = typeParameterDeclarations.length ; i < n ; i++) {
18096+ for (let i = 0; i < typeParameterDeclarations.length ; i++) {
1809718097 const node = typeParameterDeclarations[i];
1809818098 checkTypeParameter(node);
1809918099
@@ -18373,7 +18373,7 @@ namespace ts {
1837318373 // TypeScript 1.0 spec (April 2014):
1837418374 // When a generic interface has multiple declarations, all declarations must have identical type parameter
1837518375 // lists, i.e. identical type parameter names with identical constraints in identical order.
18376- for (let i = 0, len = list1.length ; i < len ; i++) {
18376+ for (let i = 0; i < list1.length ; i++) {
1837718377 const tp1 = list1[i];
1837818378 const tp2 = list2[i];
1837918379 if (tp1.name.text !== tp2.name.text) {
@@ -20817,7 +20817,7 @@ namespace ts {
2081720817 case SyntaxKind.PublicKeyword:
2081820818 case SyntaxKind.ProtectedKeyword:
2081920819 case SyntaxKind.PrivateKeyword:
20820- let text = visibilityToString(modifierToFlag(modifier.kind));
20820+ const text = visibilityToString(modifierToFlag(modifier.kind));
2082120821
2082220822 if (modifier.kind === SyntaxKind.ProtectedKeyword) {
2082320823 lastProtected = modifier;
0 commit comments