We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc0c137 commit dc7b18eCopy full SHA for dc7b18e
src/compiler/checker.ts
@@ -6401,11 +6401,10 @@ namespace ts {
6401
}
6402
6403
6404
- if (source.flags & TypeFlags.ObjectType && target.flags & TypeFlags.Primitive) {
6405
- tryElaborateErrorsForPrimitivesAndObjects(source, target);
6406
- }
6407
-
6408
if (reportErrors) {
+ if (source.flags & TypeFlags.ObjectType && target.flags & TypeFlags.Primitive) {
+ tryElaborateErrorsForPrimitivesAndObjects(source, target);
+ }
6409
reportRelationError(headMessage, source, target);
6410
6411
return Ternary.False;
0 commit comments