We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c89f355 commit 7bd2a6eCopy full SHA for 7bd2a6e
src/compiler/checker.ts
@@ -18493,7 +18493,7 @@ namespace ts {
18493
if (reduced !== type) {
18494
return reduced;
18495
}
18496
- if (type.flags & TypeFlags.Intersection) {
+ if (type.flags & TypeFlags.Intersection && some((type as IntersectionType).types, isEmptyAnonymousObjectType)) {
18497
const normalizedTypes = sameMap(type.types, t => getNormalizedType(t, writing));
18498
if (normalizedTypes !== type.types) {
18499
return getIntersectionType(normalizedTypes);
0 commit comments