Skip to content

Commit 7bd2a6e

Browse files
committed
Only normalize intersections that include {}
1 parent c89f355 commit 7bd2a6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18493,7 +18493,7 @@ namespace ts {
1849318493
if (reduced !== type) {
1849418494
return reduced;
1849518495
}
18496-
if (type.flags & TypeFlags.Intersection) {
18496+
if (type.flags & TypeFlags.Intersection && some((type as IntersectionType).types, isEmptyAnonymousObjectType)) {
1849718497
const normalizedTypes = sameMap(type.types, t => getNormalizedType(t, writing));
1849818498
if (normalizedTypes !== type.types) {
1849918499
return getIntersectionType(normalizedTypes);

0 commit comments

Comments
 (0)