This commit is contained in:
Ryan Cavanaugh
2020-04-24 16:04:33 -07:00
committed by GitHub
parent b1d464d5e5
commit 84c83da3a9
3 changed files with 6 additions and 3 deletions

View File

@@ -20555,7 +20555,7 @@ namespace ts {
}
function narrowByInKeyword(type: Type, literal: LiteralExpression, assumeTrue: boolean) {
if (type.flags & (TypeFlags.Union | TypeFlags.Object | TypeFlags.Intersection) || isThisTypeParameter(type)) {
if (type.flags & (TypeFlags.Union | TypeFlags.Object) || isThisTypeParameter(type)) {
const propName = escapeLeadingUnderscores(literal.text);
return filterType(type, t => isTypePresencePossible(t, propName, assumeTrue));
}