Mixins for ES6 classes, transpiled with babel
问题 According to various sources (2ality, esdiscuss) one should be able to add mixins to classes: EDIT discovered that class methods are not enumerable so that cannot work. Edited the code below, but still no joy class CartoonCharacter { constructor(author) { this.author = author; } drawnBy() { console.log(\"drawn by\", this.author); } } // THIS CANNOT WORK // class methods are not enumerable // class Human { // haveFun() { // console.log(\"drinking beer\"); // } // } let Human = Object.create({}