(node)
| 78516 | return errorType; |
| 78517 | } |
| 78518 | function checkPostfixUnaryExpression(node) { |
| 78519 | var operandType = checkExpression(node.operand); |
| 78520 | if (operandType === silentNeverType) { |
| 78521 | return silentNeverType; |
| 78522 | } |
| 78523 | var ok = checkArithmeticOperandType(node.operand, checkNonNullType(operandType, node.operand), ts.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_bigint_or_an_enum_type); |
| 78524 | if (ok) { |
| 78525 | // run check only if former checks succeeded to avoid reporting cascading errors |
| 78526 | checkReferenceExpression(node.operand, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access, ts.Diagnostics.The_operand_of_an_increment_or_decrement_operator_may_not_be_an_optional_property_access); |
| 78527 | } |
| 78528 | return getUnaryResultType(operandType); |
| 78529 | } |
| 78530 | function getUnaryResultType(operandType) { |
| 78531 | if (maybeTypeOfKind(operandType, 2112 /* TypeFlags.BigIntLike */)) { |
| 78532 | return isTypeAssignableToKind(operandType, 3 /* TypeFlags.AnyOrUnknown */) || maybeTypeOfKind(operandType, 296 /* TypeFlags.NumberLike */) |
no test coverage detected
searching dependent graphs…