mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Improve variable naming
Change `localErrors` to `reportMoreErrors` to more accurately reflect what the variable does.
This commit is contained in:
parent
c87c1e9b3f
commit
e4e0667a87
@ -5439,21 +5439,21 @@ namespace ts {
|
||||
|
||||
outer: for (const t of targetSignatures) {
|
||||
if (!t.hasStringLiterals || target.flags & TypeFlags.FromSignature) {
|
||||
let localErrors = reportErrors;
|
||||
// Only report errors from the first failure
|
||||
let reportMoreErrors = reportErrors;
|
||||
const checkedAbstractAssignability = false;
|
||||
for (const s of sourceSignatures) {
|
||||
if (!s.hasStringLiterals || source.flags & TypeFlags.FromSignature) {
|
||||
const related = signatureRelatedTo(s, t, localErrors);
|
||||
const related = signatureRelatedTo(s, t, reportMoreErrors);
|
||||
if (related) {
|
||||
result &= related;
|
||||
errorInfo = saveErrorInfo;
|
||||
continue outer;
|
||||
}
|
||||
// Only report errors from the first failure
|
||||
localErrors = false;
|
||||
reportMoreErrors = false;
|
||||
}
|
||||
}
|
||||
if (localErrors) {
|
||||
if (reportMoreErrors) {
|
||||
reportError(Diagnostics.Type_0_provides_no_match_for_the_signature_1,
|
||||
typeToString(source),
|
||||
signatureToString(t, /*enclosingDeclaration*/ undefined, /*flags*/ undefined, kind));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user