Contextually type the RHS of logical 'and' and comma expressions.
This commit is contained in:
parent
06bff434cc
commit
5ab5cfd2fd
1 changed files with 6 additions and 0 deletions
|
@ -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