We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c22a54f commit b336c69Copy full SHA for b336c69
1 file changed
src/compiler/checker.ts
@@ -7858,7 +7858,7 @@ namespace ts {
7858
// and primitive types are removed by other type guards.
7859
const filteredType = getTypeWithFacts(type, TypeFacts.Discriminatable);
7860
if (filteredType !== type && filteredType.flags & TypeFlags.Union) {
7861
- prop = getPropertyOfType(type, name);
+ prop = getPropertyOfType(filteredType, name);
7862
}
7863
7864
if (prop && prop.flags & SymbolFlags.SyntheticProperty) {
0 commit comments