Skip to content

Commit d45806a

Browse files
committed
More closely match previous behavior
1 parent 86f09ae commit d45806a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/compiler/checker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -24122,7 +24122,7 @@ namespace ts {
2412224122
}
2412324123

2412424124
function isGenericTypeWithUnionConstraint(type: Type) {
24125-
return !!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & TypeFlags.Union);
24125+
return !!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & (TypeFlags.Nullable | TypeFlags.Union));
2412624126
}
2412724127

2412824128
function containsGenericType(type: Type): boolean {

0 commit comments

Comments
 (0)