Commits
Click on a commit to change the comparison rangerefactor(transformer): shared `VarDeclarations` (#6170)
First step towards #5049.
Various transforms need to add a `var` statement at top of enclosing statement block.
e.g.:
```js
// Input
a ??= b;
```
```js
// Output
var _a;
(_a = a) !== null && _a !== void 0 ? _a : (a = b);
```
Each of these transforms previously maintained it's own stack and added `var` statements individually.
Share this functionality in a "common" utility transform which maintains a single stack to serve them all.1 year ago
by overlookmotel