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
if (getObjectFlags(type) & ObjectFlags.IdenticalBaseTypeCalculated) {
19950
+
return getObjectFlags(type) & ObjectFlags.IdenticalBaseTypeExists ? (type as TypeReference).cachedEquivalentBaseType : undefined;
19950
19951
}
19952
+
(type as TypeReference).objectFlags |= ObjectFlags.IdenticalBaseTypeCalculated;
19951
19953
const target = (type as TypeReference).target as InterfaceType;
19952
19954
const bases = getBaseTypes(target);
19953
19955
if (bases.length !== 1) {
19954
-
return (type as TypeReference).cachedEquivalentBaseTypeOrSelf = type;
19956
+
return undefined;
19955
19957
}
19956
19958
if (getMembersOfSymbol(type.symbol).size) {
19957
-
return (type as TypeReference).cachedEquivalentBaseTypeOrSelf = type; // If the interface has any members, they may subtype members in the base, so we should do a full structural comparison
19959
+
return undefined; // If the interface has any members, they may subtype members in the base, so we should do a full structural comparison
19958
19960
}
19959
19961
let instantiatedBase = !length(target.typeParameters) ? bases[0] : instantiateType(bases[0], createTypeMapper(target.typeParameters!, getTypeArguments(type as TypeReference).slice(0, target.typeParameters!.length)));
19960
19962
if (length(getTypeArguments(type as TypeReference)) > length(target.typeParameters)) {
19961
19963
instantiatedBase = getTypeWithThisArgument(instantiatedBase, last(getTypeArguments(type as TypeReference)));
19962
19964
}
19963
-
return (type as TypeReference).cachedEquivalentBaseTypeOrSelf = instantiatedBase;
19965
+
(type as TypeReference).objectFlags |= ObjectFlags.IdenticalBaseTypeExists;
19966
+
return (type as TypeReference).cachedEquivalentBaseType = instantiatedBase;
19964
19967
}
19965
19968
19966
19969
function isEmptyArrayLiteralType(type: Type): boolean {
0 commit comments