const origin = new A();
const duplicate = Object.assign(Object.create(A.prototype), origin);
const origin = new A();
const duplicate = Object.assign(Object.create(A.prototype), origin);
本文标题:TypeScript和JavaScript复制类实例的方法(保留
本文链接:https://www.haomeiwen.com/subject/wtvudktx.html
网友评论