Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikhail-ev/babel-plugin-transform-multiple-inheritance
babel plugin for multiple inheritance
https://github.com/mikhail-ev/babel-plugin-transform-multiple-inheritance
Last synced: 3 days ago
JSON representation
babel plugin for multiple inheritance
- Host: GitHub
- URL: https://github.com/mikhail-ev/babel-plugin-transform-multiple-inheritance
- Owner: mikhail-ev
- License: mit
- Created: 2019-11-21T14:15:04.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T01:23:27.000Z (about 2 years ago)
- Last Synced: 2025-01-02T03:53:31.627Z (6 days ago)
- Language: JavaScript
- Size: 32.2 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# babel-plugin-transform-multiple-inheritance
Transforms sequence expression given after `extends`.## Installing
`npm i babel-plugin-transform-multiple-inheritance`## Example
Transforms following class declaration
```js
class RoboRabbit extends (Animal, Robot) {
}
```
Into:
```js
class RoboRabbit extends (function () {
function ProxySuperClass() {
Object.assign(this, new Robot(), new Animal());
}ProxySuperClass.prototype = new Proxy({}, {
get(target, prop) {
return target[prop] || Animal.prototype[prop] || Robot.prototype[prop];
},getPrototypeOf() {
return Animal.prototype;
}});
return ProxySuperClass;
})() {}
```