(function () { // 使用接口 class Main { // price: number; constructor(name, color, price) { this.name = name; this.color = color; // this.price = price; } } let m = new Main('牡丹', '红色', 100); console.log(m); })();