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 c5ee5ea commit 6749141Copy full SHA for 6749141
src/compiler/checker.ts
@@ -13597,6 +13597,9 @@ namespace ts {
13597
// union includes empty object types (e.g. reducing {} | string to just {}).
13598
return getUnionType(widenedTypes, some(widenedTypes, isEmptyObjectType) ? UnionReduction.Subtype : UnionReduction.Literal);
13599
}
13600
+ if (type.flags & TypeFlags.Intersection) {
13601
+ return getIntersectionType(sameMap((<IntersectionType>type).types, getWidenedType));
13602
+ }
13603
if (isArrayType(type) || isTupleType(type)) {
13604
return createTypeReference((<TypeReference>type).target, sameMap((<TypeReference>type).typeArguments, getWidenedType));
13605
0 commit comments