This commit is contained in:
Anders Hejlsberg
2017-12-13 13:41:17 -08:00
parent 20434fabe6
commit ddc631c5d4

View File

@@ -6394,7 +6394,7 @@ namespace ts {
}
if (t.flags & TypeFlags.Conditional) {
const trueBaseType = getBaseConstraint((<ConditionalType>t).trueType);
const falseBaseType = getBaseConstraint((<ConditionalType>t).trueType);
const falseBaseType = getBaseConstraint((<ConditionalType>t).falseType);
return trueBaseType && falseBaseType ? getUnionType([trueBaseType, falseBaseType]) : undefined;
}
if (t.flags & TypeFlags.Extends) {