mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Only normalize intersections that include {} (#50535)
* Only normalize intersections that include {}
* Accept new baselines
This commit is contained in:
@@ -18493,7 +18493,7 @@ namespace ts {
|
||||
if (reduced !== type) {
|
||||
return reduced;
|
||||
}
|
||||
if (type.flags & TypeFlags.Intersection) {
|
||||
if (type.flags & TypeFlags.Intersection && some((type as IntersectionType).types, isEmptyAnonymousObjectType)) {
|
||||
const normalizedTypes = sameMap(type.types, t => getNormalizedType(t, writing));
|
||||
if (normalizedTypes !== type.types) {
|
||||
return getIntersectionType(normalizedTypes);
|
||||
|
||||
Reference in New Issue
Block a user