class People{ say1(){console.log(1)} } class Dog{ say2(){console.log(2)} } class Singer{ say3(){console.log(3)} } class Luck extends mix(People, Dog, Singer) { hello(){console.log(4)} } function mix(...func) { let obj = {}; func.map(item => { Reflect.ownKeys(item.prototype).forEach(sub => { obj[sub] = item.prototype[sub] }) }) console.log(obj) let fn = function(){} fn.prototype = obj fn.prototype.constructor = fn console.log(fn) return fn } let me = new Luck(); console.log(me) me.say1()