Optimize Call Expressions
This feature optimizes a call expression by transforming the function call to a more efficient form. The code sample demonstrates how to use the `optimiseCallExpression` function to optimize a call to `myFunction` with arguments `1` and `2`.
const { default: optimiseCallExpression } = require('@babel/helper-optimise-call-expression');
const t = require('@babel/types');
const callee = t.identifier('myFunction');
const args = [t.numericLiteral(1), t.numericLiteral(2)];
const optimizedCall = optimiseCallExpression(callee, null, args);
console.log(optimizedCall);