File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -28027,15 +28027,15 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2802728027 // We only construct maps for unions with many non-primitive constituents.
2802828028 if (
2802928029 types.length < 10 || getObjectFlags(unionType) & ObjectFlags.PrimitiveUnion ||
28030- countWhere(types, t => !!(t.flags & (TypeFlags.Object | TypeFlags.InstantiableNonPrimitive))) < 10
28030+ countWhere(types, t => !!(t.flags & (TypeFlags.Object | TypeFlags.Intersection | TypeFlags. InstantiableNonPrimitive))) < 10
2803128031 ) {
2803228032 return undefined;
2803328033 }
2803428034 if (unionType.keyPropertyName === undefined) {
2803528035 // The candidate key property name is the name of the first property with a unit type in one of the
2803628036 // constituent types.
2803728037 const keyPropertyName = forEach(types, t =>
28038- t.flags & (TypeFlags.Object | TypeFlags.InstantiableNonPrimitive) ?
28038+ t.flags & (TypeFlags.Object | TypeFlags.Intersection | TypeFlags. InstantiableNonPrimitive) ?
2803928039 forEach(getPropertiesOfType(t), p => isUnitType(getTypeOfSymbol(p)) ? p.escapedName : undefined) :
2804028040 undefined);
2804128041 const mapByKeyProperty = keyPropertyName && mapTypesByKeyProperty(types, keyPropertyName);
You can’t perform that action at this time.
0 commit comments