File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -17418,9 +17418,10 @@ namespace ts {
1741817418 // A substitution type originates in the true branch of a conditional type and can be resolved
1741917419 // to just the base type in the same cases as the conditional type resolves to its true branch
1742017420 // (because the base type is then known to satisfy the constraint).
17421- if (newConstraint.flags & TypeFlags.AnyOrUnknown ||
17421+ if (!(newBaseType.flags & TypeFlags.TypeVariable) && (
17422+ newConstraint.flags & TypeFlags.AnyOrUnknown ||
1742217423 !isGenericType(newBaseType) && !isGenericType(newConstraint) ||
17423- isTypeAssignableTo(getRestrictiveInstantiation(newBaseType), getRestrictiveInstantiation(newConstraint))) {
17424+ isTypeAssignableTo(getRestrictiveInstantiation(newBaseType), getRestrictiveInstantiation(newConstraint)))) {
1742417425 return newBaseType;
1742517426 }
1742617427 return getSubstitutionType(newBaseType, newConstraint);
You can’t perform that action at this time.
0 commit comments