File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4640,7 +4640,9 @@ namespace ts {
46404640 // and intersection types are further deconstructed on the target side, we don't want to
46414641 // make the check again (as it might fail for a partial target type). Therefore we obtain
46424642 // the regular source type and proceed with that.
4643- source = getRegularTypeOfObjectLiteral(source);
4643+ if (target.flags & TypeFlags.UnionOrIntersection) {
4644+ source = getRegularTypeOfObjectLiteral(source);
4645+ }
46444646 }
46454647
46464648 let saveErrorInfo = errorInfo;
@@ -5511,6 +5513,7 @@ namespace ts {
55115513 regularType.constructSignatures = (<ResolvedType>type).constructSignatures;
55125514 regularType.stringIndexType = (<ResolvedType>type).stringIndexType;
55135515 regularType.numberIndexType = (<ResolvedType>type).numberIndexType;
5516+ (<FreshObjectLiteralType>type).regularType = regularType;
55145517 }
55155518 return regularType;
55165519 }
You can’t perform that action at this time.
0 commit comments