File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5215,7 +5215,9 @@ namespace ts {
5215
5215
// Report constraint errors only if the constraint is not the empty object type
5216
5216
const reportConstraintErrors = reportErrors && constraint !== emptyObjectType;
5217
5217
if (result = isRelatedTo(constraint, target, reportConstraintErrors)) {
5218
- errorInfo = saveErrorInfo;
5218
+ if (reportErrors) {
5219
+ errorInfo = saveErrorInfo;
5220
+ }
5219
5221
return result;
5220
5222
}
5221
5223
}
@@ -5236,7 +5238,9 @@ namespace ts {
5236
5238
// Report structural errors only if we haven't reported any errors yet
5237
5239
const reportStructuralErrors = reportErrors && errorInfo === saveErrorInfo;
5238
5240
if (result = objectTypeRelatedTo(apparentType, source, target, reportStructuralErrors)) {
5239
- errorInfo = saveErrorInfo;
5241
+ if (reportErrors) {
5242
+ errorInfo = saveErrorInfo;
5243
+ }
5240
5244
return result;
5241
5245
}
5242
5246
}
@@ -5614,7 +5618,9 @@ namespace ts {
5614
5618
const related = signatureRelatedTo(s, t, shouldElaborateErrors);
5615
5619
if (related) {
5616
5620
result &= related;
5617
- errorInfo = saveErrorInfo;
5621
+ if (reportErrors) {
5622
+ errorInfo = saveErrorInfo;
5623
+ }
5618
5624
continue outer;
5619
5625
}
5620
5626
shouldElaborateErrors = false;
You can’t perform that action at this time.
0 commit comments