diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 4d95f128b1a0d..4a3f31bcd27c5 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -22023,7 +22023,7 @@ namespace ts { // The candidate key property name is the name of the first property with a unit type in one of the // constituent types. const keyPropertyName = forEach(types, t => - t.flags & (TypeFlags.Object | TypeFlags.Intersection | TypeFlags.InstantiableNonPrimitive) ? + t.flags & (TypeFlags.Object | TypeFlags.InstantiableNonPrimitive) ? forEach(getPropertiesOfType(t), p => isUnitType(getTypeOfSymbol(p)) ? p.escapedName : undefined) : undefined); const mapByKeyProperty = keyPropertyName && mapTypesByKeyProperty(types, keyPropertyName);