-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix latest tslint errors #13006
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix latest tslint errors #13006
Changes from all commits
3202d59
603ba89
27a60e4
27ed5b8
2a941a7
1f79741
1a6e43d
67e1fd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5019,7 +5019,7 @@ namespace ts { | |
// If this is a JSDoc construct signature, then skip the first parameter in the | ||
// parameter list. The first parameter represents the return type of the construct | ||
// signature. | ||
for (let i = isJSConstructSignature ? 1 : 0, n = declaration.parameters.length; i < n; i++) { | ||
for (let i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) { | ||
const param = declaration.parameters[i]; | ||
|
||
let paramSymbol = param.symbol; | ||
|
@@ -5118,7 +5118,7 @@ namespace ts { | |
function getSignaturesOfSymbol(symbol: Symbol): Signature[] { | ||
if (!symbol) return emptyArray; | ||
const result: Signature[] = []; | ||
for (let i = 0, len = symbol.declarations.length; i < len; i++) { | ||
for (let i = 0; i < symbol.declarations.length; i++) { | ||
const node = symbol.declarations[i]; | ||
switch (node.kind) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. switch to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inner lines of code use |
||
case SyntaxKind.FunctionType: | ||
|
@@ -5768,8 +5768,8 @@ namespace ts { | |
} | ||
|
||
function isSubtypeOfAny(candidate: Type, types: Type[]): boolean { | ||
for (let i = 0, len = types.length; i < len; i++) { | ||
if (candidate !== types[i] && isTypeSubtypeOf(candidate, types[i])) { | ||
for (const type of types) { | ||
if (candidate !== type && isTypeSubtypeOf(candidate, type)) { | ||
return true; | ||
} | ||
} | ||
|
@@ -7911,7 +7911,7 @@ namespace ts { | |
return Ternary.False; | ||
} | ||
let result = Ternary.True; | ||
for (let i = 0, len = sourceSignatures.length; i < len; i++) { | ||
for (let i = 0; i < sourceSignatures.length; i++) { | ||
const related = compareSignaturesIdentical(sourceSignatures[i], targetSignatures[i], /*partialMatch*/ false, /*ignoreThisTypes*/ false, /*ignoreReturnTypes*/ false, isRelatedTo); | ||
if (!related) { | ||
return Ternary.False; | ||
|
@@ -18044,7 +18044,7 @@ namespace ts { | |
/** Check each type parameter and check that type parameters have no duplicate type parameter declarations */ | ||
function checkTypeParameters(typeParameterDeclarations: TypeParameterDeclaration[]) { | ||
if (typeParameterDeclarations) { | ||
for (let i = 0, n = typeParameterDeclarations.length; i < n; i++) { | ||
for (let i = 0; i < typeParameterDeclarations.length; i++) { | ||
const node = typeParameterDeclarations[i]; | ||
checkTypeParameter(node); | ||
|
||
|
@@ -18324,7 +18324,7 @@ namespace ts { | |
// TypeScript 1.0 spec (April 2014): | ||
// When a generic interface has multiple declarations, all declarations must have identical type parameter | ||
// lists, i.e. identical type parameter names with identical constraints in identical order. | ||
for (let i = 0, len = list1.length; i < len; i++) { | ||
for (let i = 0; i < list1.length; i++) { | ||
const tp1 = list1[i]; | ||
const tp2 = list2[i]; | ||
if (tp1.name.text !== tp2.name.text) { | ||
|
@@ -20761,7 +20761,7 @@ namespace ts { | |
case SyntaxKind.PublicKeyword: | ||
case SyntaxKind.ProtectedKeyword: | ||
case SyntaxKind.PrivateKeyword: | ||
let text = visibilityToString(modifierToFlag(modifier.kind)); | ||
const text = visibilityToString(modifierToFlag(modifier.kind)); | ||
|
||
if (modifier.kind === SyntaxKind.ProtectedKeyword) { | ||
lastProtected = modifier; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for (let i = isJSConstructSignature ? 1 : 0; i < declaration.parameters.length; i++) {