We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27d9dbe commit 471ac3cCopy full SHA for 471ac3c
src/compiler/checker.ts
@@ -15583,7 +15583,7 @@ namespace ts {
15583
}
15584
15585
if (unionParent && !result && targetIsOptional) {
15586
- result = isRelatedTo(source, undefinedType);
+ result = isRelatedTo(source, addOptionality(getTypeOfSymbol(targetProp), targetIsOptional));
15587
15588
if (unionParent && !result && reportErrors) {
15589
// The easiest way to get the right errors here is to un-defer (which may be costly)
0 commit comments