mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-16 15:51:35 -05:00
Excluded type unions from the generale source types
This commit is contained in:
@@ -15489,7 +15489,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
if (isLiteralType(source) && !isLiteralType(target)) {
|
||||
if (isLiteralType(source) && !(source.flags & TypeFlags.Union) && !isLiteralType(target) && !(target.flags & TypeFlags.Union)) {
|
||||
generalizedSourceType = getTypeNameForErrorDisplay(getBaseTypeOfLiteralType(source));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user