File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -10551,11 +10551,7 @@ namespace ts {
10551
10551
}
10552
10552
if (type.flags & TypeFlags.Union) {
10553
10553
const unionContext = context || createWideningContext(/*parent*/ undefined, /*propertyName*/ undefined, (<UnionType>type).types);
10554
- const widenedTypes = sameMap((<UnionType>type).types, t => t.flags & TypeFlags.Nullable ? t : getWidenedTypeWithContext(t, unionContext));
10555
- // Widening an empty object literal transitions from a highly restrictive type to
10556
- // a highly inclusive one. For that reason we perform subtype reduction here if the
10557
- // union includes empty object types (e.g. reducing {} | string to just {}).
10558
- return getUnionType(widenedTypes, some(widenedTypes, isEmptyObjectType));
10554
+ return getUnionType(sameMap((<UnionType>type).types, t => t.flags & TypeFlags.Nullable ? t : getWidenedTypeWithContext(t, unionContext)));
10559
10555
}
10560
10556
if (isArrayType(type) || isTupleType(type)) {
10561
10557
return createTypeReference((<TypeReference>type).target, sameMap((<TypeReference>type).typeArguments, getWidenedType));
You can’t perform that action at this time.
0 commit comments