Used DH's suggested heuristic

This commit is contained in:
Josh Goldberg
2020-04-22 12:48:23 -04:00
parent d12b741004
commit 99cdb64839
13 changed files with 39 additions and 39 deletions

View File

@@ -15489,7 +15489,7 @@ namespace ts {
}
}
if (isLiteralType(source) && !(source.flags & TypeFlags.Union) && !isLiteralType(target) && !(target.flags & TypeFlags.Union)) {
if (isLiteralType(source) && !forEachType(target, isUnitType)) {
generalizedSourceType = getTypeNameForErrorDisplay(getBaseTypeOfLiteralType(source));
}