Contextually type the RHS of logical 'and' and comma expressions.

This commit is contained in:
Daniel Rosenwasser 2016-01-04 22:54:37 -05:00
parent 06bff434cc
commit 5ab5cfd2fd

View file

@ -7362,6 +7362,12 @@ namespace ts {
} }
return type; return type;
} }
else if (operator === SyntaxKind.AmpersandAmpersandToken || operator === SyntaxKind.CommaToken) {
if (node === binaryExpression.right) {
return getContextualType(binaryExpression);
}
}
return undefined; return undefined;
} }