We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Math.pow(a,b)
a ** (+b)
(+a) ** (+b)
1 parent 9e3571f commit 814eab6Copy full SHA for 814eab6
crates/oxc_minifier/src/peephole/replace_known_methods.rs
@@ -392,7 +392,8 @@ impl<'a> PeepholeOptimizations {
392
393
Some(ctx.ast.expression_binary(
394
span,
395
- wrap_with_unary_plus_if_needed(first_arg),
+ // see [`PeepholeOptimizations::is_binary_operator_that_does_number_conversion`] why it does not require `wrap_with_unary_plus_if_needed` here
396
+ ctx.ast.move_expression(first_arg),
397
BinaryOperator::Exponential,
398
wrap_with_unary_plus_if_needed(second_arg),
399
))
0 commit comments