mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
After transformation, super expressions have moved to unexpected places. This PR replaces super expression to call expression, and then inserts the super methods to the top of the method body.
For example:
Before:
```js
class G {
async method() {
super.foo()
}
}
```
After:
```js
class G {
method() {
var _superprop_getFoo = () => super.foo,
_this = this;
return _asyncToGenerator(function* () {
_superprop_getFoo().call(_this);
})();
}
}```
|
||
|---|---|---|
| .. | ||
| babel-plugin-transform-arrow-functions/test/fixtures | ||
| babel-plugin-transform-async-generator-functions/test/fixtures | ||
| babel-plugin-transform-async-to-generator/test/fixtures | ||
| babel-plugin-transform-class-static-block/test/fixtures | ||
| babel-plugin-transform-exponentiation-operator/test/fixtures | ||
| babel-plugin-transform-nullish-coalescing-operator/test/fixtures | ||
| babel-plugin-transform-optional-catch-binding/test/fixtures | ||
| babel-plugin-transform-react-jsx/test/fixtures | ||
| babel-plugin-transform-react-jsx-source/test/fixtures/react-source | ||
| babel-plugin-transform-typescript/test/fixtures | ||
| babel-preset-typescript/test/fixtures/removeImportExtensions | ||
| regexp/test/fixtures | ||