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 b6a836a commit 6fdc7e3Copy full SHA for 6fdc7e3
src/compiler/checker.ts
@@ -15274,7 +15274,7 @@ namespace ts {
15274
if (!(hasDefaultClause || (type.flags & TypeFlags.Union))) {
15275
let impliedType = getTypeWithFacts(getUnionType(clauseWitnesses.map(getTypeFromName)), switchFacts);
15276
if (impliedType.flags & TypeFlags.Union) {
15277
- impliedType = getAssignmentReducedType(impliedType as UnionType, getBaseConstraintOfType(type) || type);
+ impliedType = getAssignmentReducedType(impliedType as UnionType, getBaseConstraintOrType(type));
15278
}
15279
if (isTypeSubtypeOf(impliedType, type)) {
15280
return impliedType;
0 commit comments