File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -3991,7 +3991,7 @@ namespace ts {
3991
3991
// A valid base type is any non-generic object type or intersection of non-generic
3992
3992
// object types.
3993
3993
function isValidBaseType(type: Type): boolean {
3994
- return type.flags & TypeFlags.Object && !isGenericMappedType(type) ||
3994
+ return type.flags & ( TypeFlags.Object | TypeFlags.NonPrimitive) && !isGenericMappedType(type) ||
3995
3995
type.flags & TypeFlags.Intersection && !forEach((<IntersectionType>type).types, t => !isValidBaseType(t));
3996
3996
}
3997
3997
@@ -4944,7 +4944,7 @@ namespace ts {
4944
4944
t.flags & TypeFlags.NumberLike ? globalNumberType :
4945
4945
t.flags & TypeFlags.BooleanLike ? globalBooleanType :
4946
4946
t.flags & TypeFlags.ESSymbol ? getGlobalESSymbolType() :
4947
- t.flags & TypeFlags.NonPrimitive ? globalObjectType :
4947
+ t.flags & TypeFlags.NonPrimitive ? emptyObjectType :
4948
4948
t;
4949
4949
}
4950
4950
You can’t perform that action at this time.
0 commit comments