File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4640,7 +4640,9 @@ namespace ts {
4640
4640
// and intersection types are further deconstructed on the target side, we don't want to
4641
4641
// make the check again (as it might fail for a partial target type). Therefore we obtain
4642
4642
// the regular source type and proceed with that.
4643
- source = getRegularTypeOfObjectLiteral(source);
4643
+ if (target.flags & TypeFlags.UnionOrIntersection) {
4644
+ source = getRegularTypeOfObjectLiteral(source);
4645
+ }
4644
4646
}
4645
4647
4646
4648
let saveErrorInfo = errorInfo;
@@ -5511,6 +5513,7 @@ namespace ts {
5511
5513
regularType.constructSignatures = (<ResolvedType>type).constructSignatures;
5512
5514
regularType.stringIndexType = (<ResolvedType>type).stringIndexType;
5513
5515
regularType.numberIndexType = (<ResolvedType>type).numberIndexType;
5516
+ (<FreshObjectLiteralType>type).regularType = regularType;
5514
5517
}
5515
5518
return regularType;
5516
5519
}
You can’t perform that action at this time.
0 commit comments