More closely match previous behavior

This commit is contained in:
Anders Hejlsberg 2021-05-23 17:03:11 -07:00
parent 86f09ae87c
commit d45806a984

View file

@ -24122,7 +24122,7 @@ namespace ts {
}
function isGenericTypeWithUnionConstraint(type: Type) {
return !!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & TypeFlags.Union);
return !!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & (TypeFlags.Nullable | TypeFlags.Union));
}
function containsGenericType(type: Type): boolean {