mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Address PR comments
This commit is contained in:
1 parent
11929e33ed
commit
271ca80c75
1 file changed
+4
-2
@@ -7777,8 +7777,10 @@ namespace ts {
|
||||
return related;
|
||||
}
|
||||
}
|
||||
const discriminantType = findMatchingDiscriminantType(source, target);
|
||||
isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], reportErrors);
|
||||
if (reportErrors) {
|
||||
const discriminantType = findMatchingDiscriminantType(source, target);
|
||||
isRelatedTo(source, discriminantType || targetTypes[targetTypes.length - 1], /*reportErrors*/ true);
|
||||
}
|
||||
return Ternary.False;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user