@@ -14812,6 +14812,7 @@ namespace ts {
14812
14812
function getNormalizedType(type: Type, writing: boolean): Type {
14813
14813
return isFreshLiteralType(type) ? (<FreshableType>type).regularType :
14814
14814
getObjectFlags(type) & ObjectFlags.Reference && (<TypeReference>type).node ? createTypeReference((<TypeReference>type).target, getTypeArguments(<TypeReference>type)) :
14815
+ type.flags & TypeFlags.Intersection && isNeverLikeIntersection(<IntersectionType>type) ? neverType :
14815
14816
type.flags & TypeFlags.Substitution ? writing ? (<SubstitutionType>type).typeVariable : (<SubstitutionType>type).substitute :
14816
14817
type.flags & TypeFlags.Simplifiable ? getSimplifiedType(type, writing) :
14817
14818
type;
@@ -15203,9 +15204,6 @@ namespace ts {
15203
15204
result = typeRelatedToSomeType(getRegularTypeOfObjectLiteral(source), <UnionType>target, reportErrors && !(source.flags & TypeFlags.Primitive) && !(target.flags & TypeFlags.Primitive));
15204
15205
}
15205
15206
else if (target.flags & TypeFlags.Intersection) {
15206
- if (isNeverLikeIntersection(<IntersectionType>target)) {
15207
- return Ternary.False;
15208
- }
15209
15207
result = typeRelatedToEachType(getRegularTypeOfObjectLiteral(source), target as IntersectionType, reportErrors, IntersectionState.Target);
15210
15208
if (result && (isPerformingExcessPropertyChecks || isPerformingCommonPropertyChecks)) {
15211
15209
// Validate against excess props using the original `source`
@@ -15215,9 +15213,6 @@ namespace ts {
15215
15213
}
15216
15214
}
15217
15215
else if (source.flags & TypeFlags.Intersection) {
15218
- if (isNeverLikeIntersection(<IntersectionType>source)) {
15219
- return Ternary.True;
15220
- }
15221
15216
// Check to see if any constituents of the intersection are immediately related to the target.
15222
15217
//
15223
15218
// Don't report errors though. Checking whether a constituent is related to the source is not actually
0 commit comments