class A{ b = 111; constructor(){ this.a =1; } } A.use = function(plugin, ...args) { // console.log(plugin, ...args) console.log(this) plugin(this, args) } function install(V,x) { V.prototype.say = () => {console.log('aaaaa',x)} } A.use(install, 999, 888) // install(A) let a = new A() a.say() console.log(a.b)