定义一个class类,私有属性字符非法不识别。看了好久没发现是啥问题
收起
你的冒号:没有写成中文的吧,要是英文的冒号
private name:string; public constructor(name:string) { this.name = name; }
报告相同问题?