mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Correct && operator to produce nullable values
This commit is contained in:
parent
54ee0b13b3
commit
1e8a7e28d0
@ -11260,7 +11260,7 @@ namespace ts {
|
||||
case SyntaxKind.InKeyword:
|
||||
return checkInExpression(left, right, leftType, rightType);
|
||||
case SyntaxKind.AmpersandAmpersandToken:
|
||||
return rightType;
|
||||
return isNullableType(leftType) ? getNullableType(rightType) : rightType;
|
||||
case SyntaxKind.BarBarToken:
|
||||
return getUnionType([getNonNullableType(leftType), rightType]);
|
||||
case SyntaxKind.EqualsToken:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user