mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
committed by
Mohamed Hegazy
parent
a6e1cedfd7
commit
0600a27dd9
@@ -8599,6 +8599,7 @@ namespace ts {
|
||||
|
||||
function isEmptyObjectType(type: Type): boolean {
|
||||
return type.flags & TypeFlags.Object ? isEmptyResolvedType(resolveStructuredTypeMembers(<ObjectType>type)) :
|
||||
type.flags & TypeFlags.NonPrimitive ? true :
|
||||
type.flags & TypeFlags.Union ? forEach((<UnionType>type).types, isEmptyObjectType) :
|
||||
type.flags & TypeFlags.Intersection ? !forEach((<UnionType>type).types, t => !isEmptyObjectType(t)) :
|
||||
false;
|
||||
|
||||
Reference in New Issue
Block a user