Closed coderaiser closed 1 year ago
hello (/** @type {string} */ (a), b);
becames:
hello/** @type {string} */(b, a, b);
After:
export default function transformer(file, api) { const j = api.jscodeshift; return j(file.source) .find(j.CallExpression) .forEach(path => { const [, arg] = path.node.arguments; path.node.arguments.unshift(arg); }) .toSource(); }
https://astexplorer.net/#/gist/79f2d0ef7de4aeb1a913a862217da9ec/9a2e487ad7159d9777bab7dac6d13990d94fc98c
Can this be reviewed please?
becames:
After:
https://astexplorer.net/#/gist/79f2d0ef7de4aeb1a913a862217da9ec/9a2e487ad7159d9777bab7dac6d13990d94fc98c