We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f6608b commit 758cdf3Copy full SHA for 758cdf3
1 file changed
src/compiler/checker.ts
@@ -4640,7 +4640,9 @@ namespace ts {
4640
// and intersection types are further deconstructed on the target side, we don't want to
4641
// make the check again (as it might fail for a partial target type). Therefore we obtain
4642
// the regular source type and proceed with that.
4643
- source = getRegularTypeOfObjectLiteral(source);
+ if (target.flags & TypeFlags.UnionOrIntersection) {
4644
+ source = getRegularTypeOfObjectLiteral(source);
4645
+ }
4646
}
4647
4648
let saveErrorInfo = errorInfo;
0 commit comments