Skip to content

Commit f41c9b2

Browse files
committed
Rename parameter
1 parent ab9e583 commit f41c9b2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/compiler/checker.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23713,9 +23713,9 @@ namespace ts {
2371323713
}
2371423714
}
2371523715

23716-
function checkArithmeticOperandType(operand: Node, type: Type, diagnostic: DiagnosticMessage, tryAwait = false): boolean {
23716+
function checkArithmeticOperandType(operand: Node, type: Type, diagnostic: DiagnosticMessage, isAwaitValid = false): boolean {
2371723717
if (!isTypeAssignableTo(type, numberOrBigIntType)) {
23718-
const awaitedType = tryAwait && getAwaitedTypeOfPromise(type);
23718+
const awaitedType = isAwaitValid && getAwaitedTypeOfPromise(type);
2371923719
errorAndMaybeSuggestAwait(
2372023720
operand,
2372123721
!!awaitedType && isTypeAssignableTo(awaitedType, numberOrBigIntType),
@@ -24327,8 +24327,8 @@ namespace ts {
2432724327
}
2432824328
else {
2432924329
// otherwise just check each operand separately and report errors as normal
24330-
const leftOk = checkArithmeticOperandType(left, leftType, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, /*tryAwait*/ true);
24331-
const rightOk = checkArithmeticOperandType(right, rightType, Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, /*tryAwait*/ true);
24330+
const leftOk = checkArithmeticOperandType(left, leftType, Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, /*isAwaitValid*/ true);
24331+
const rightOk = checkArithmeticOperandType(right, rightType, Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type, /*isAwaitValid*/ true);
2433224332
let resultType: Type;
2433324333
// If both are any or unknown, allow operation; assume it will resolve to number
2433424334
if ((isTypeAssignableToKind(leftType, TypeFlags.AnyOrUnknown) && isTypeAssignableToKind(rightType, TypeFlags.AnyOrUnknown)) ||

0 commit comments

Comments
 (0)