diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c2e798659d..fb4af5d729 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -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; }