File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -25789,8 +25789,10 @@ namespace ts {
25789
25789
!!(type.flags & TypeFlags.Instantiable && getBaseConstraintOrType(type).flags & (TypeFlags.Nullable | TypeFlags.Union));
25790
25790
}
25791
25791
25792
- function isGenericTypeWithoutNullableConstraint(type: Type) {
25793
- return !!(type.flags & TypeFlags.Instantiable && !maybeTypeOfKind(getBaseConstraintOrType(type), TypeFlags.Nullable));
25792
+ function isGenericTypeWithoutNullableConstraint(type: Type): boolean {
25793
+ return type.flags & TypeFlags.Intersection ?
25794
+ some((type as IntersectionType).types, isGenericTypeWithoutNullableConstraint) :
25795
+ !!(type.flags & TypeFlags.Instantiable && !maybeTypeOfKind(getBaseConstraintOrType(type), TypeFlags.Nullable));
25794
25796
}
25795
25797
25796
25798
function hasContextualTypeWithNoGenericTypes(node: Node, checkMode: CheckMode | undefined) {
You can’t perform that action at this time.
0 commit comments