Improve variable naming

Change `localErrors` to `reportMoreErrors` to more accurately reflect what
the variable does.
This commit is contained in:
Nathan Shively-Sanders 2015-11-25 11:10:35 -08:00
parent c87c1e9b3f
commit e4e0667a87

View File

@ -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));