File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -10578,7 +10578,7 @@ namespace ts {
10578
10578
priority = savePriority;
10579
10579
}
10580
10580
}
10581
- else if (source.flags & TypeFlags.UnionOrIntersection ) {
10581
+ else if (source.flags & TypeFlags.Union ) {
10582
10582
// Source is a union or intersection type, infer from each constituent type
10583
10583
const sourceTypes = (<UnionOrIntersectionType>source).types;
10584
10584
for (const sourceType of sourceTypes) {
@@ -10587,7 +10587,7 @@ namespace ts {
10587
10587
}
10588
10588
else {
10589
10589
source = getApparentType(source);
10590
- if (source.flags & TypeFlags.Object) {
10590
+ if (source.flags & ( TypeFlags.Object | TypeFlags.Intersection) ) {
10591
10591
const key = source.id + "," + target.id;
10592
10592
if (visited && visited.get(key)) {
10593
10593
return;
@@ -10667,7 +10667,7 @@ namespace ts {
10667
10667
function inferFromProperties(source: Type, target: Type) {
10668
10668
const properties = getPropertiesOfObjectType(target);
10669
10669
for (const targetProp of properties) {
10670
- const sourceProp = getPropertyOfObjectType (source, targetProp.escapedName);
10670
+ const sourceProp = getPropertyOfType (source, targetProp.escapedName);
10671
10671
if (sourceProp) {
10672
10672
inferFromTypes(getTypeOfSymbol(sourceProp), getTypeOfSymbol(targetProp));
10673
10673
}
You can’t perform that action at this time.
0 commit comments