diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 60d109d7600..bd8ff7568f3 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -4871,7 +4871,7 @@ namespace ts { */ function getApparentType(type: Type): Type { const t = type.flags & TypeFlags.TypeVariable ? getBaseConstraintOfType(type) || emptyObjectType : type; - return t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(type) : + return t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(t) : t.flags & TypeFlags.StringLike ? globalStringType : t.flags & TypeFlags.NumberLike ? globalNumberType : t.flags & TypeFlags.BooleanLike ? globalBooleanType :