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 ae1e8d2 commit 570f3d2Copy full SHA for 570f3d2
src/compiler/checker.ts
@@ -15863,7 +15863,7 @@ namespace ts {
15863
}
15864
15865
15866
- if (unionParent && !result) {
+ if (unionParent && !result && source.flags & TypeFlags.Union) {
15867
// The easiest way to get the right errors here is to un-defer (which may be costly)
15868
// If it turns out this is too costly too often, we can replicate the error handling logic within
15869
// typeRelatedToSomeType without the discriminatable type branch (as that requires a manifest union
0 commit comments