You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// We obtain the base constraint for all instantiable types, except indexed access types of the form
12064
-
// { [P in K]: E }[X], where K is non-generic and X is generic. For those types, we instead substitute an
12065
-
// instantiation of E where P is replaced with X. We do this because getBaseConstraintOfType directly
12066
-
// lowers to an instantiation where X's constraint is substituted for X, which isn't always desirable.
12067
-
const t = !(type.flags & TypeFlags.Instantiable) ? type :
12068
-
isMappedTypeGenericIndexedAccess(type) ? substituteIndexedMappedType((type as IndexedAccessType).objectType as MappedType, (type as IndexedAccessType).indexType) :
12069
-
getBaseConstraintOfType(type) || unknownType;
12073
+
const t = !(type.flags & TypeFlags.Instantiable) ? type : getBaseConstraintOfType(type) || unknownType;
12070
12074
return getObjectFlags(t) & ObjectFlags.Mapped ? getApparentTypeOfMappedType(t as MappedType) :
12071
12075
t.flags & TypeFlags.Intersection ? getApparentTypeOfIntersectionType(t as IntersectionType) :
0 commit comments