开发者问题收集
我想将实例类转换为普通对象,而不丢失方法和/或继承的属性。例如:class Human {height: number;weight: number;constructor() {this.height = 180;this.weight = 180;}getWeight() { return this.weight; }// I want this function to convert the