mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 17:27:54 -05:00
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user