Contextually type the RHS of logical 'and' and comma expressions.
This commit is contained in:
parent
06bff434cc
commit
5ab5cfd2fd
|
@ -7362,6 +7362,12 @@ namespace ts {
|
|||
}
|
||||
return type;
|
||||
}
|
||||
else if (operator === SyntaxKind.AmpersandAmpersandToken || operator === SyntaxKind.CommaToken) {
|
||||
if (node === binaryExpression.right) {
|
||||
return getContextualType(binaryExpression);
|
||||
}
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue