我有一个MongoDb后端,并且正在开发我的棱角前端。
我有这个模特:
x:0,height:3,type:"start"
x:1,height:5,type:"start"
x:1,height:4,type:"start"
x:3,height:6,type:"start"
x:4,height:7,type:"start"
x:5,height:8,type:"end"
x:5,height:9,type:"end"
x:6,height:10,type:"start"
x:7,height:12,type:"start"
x:7,height:11,type:"end"
我也有这个功能:
export class Developer {
public _id: string;
public name: string;
public age: number;
constructor(_id: string, name: string, age: number){
this._id = _id;
this.name = name;
this.age = age;
}
public get _name(): string {
return this.name;
}
public set _name(n : string ){
this.name = n;
}
public get _age(): number {
return this.age;
}
public set _age(n: number){
this.age = n;
}
}
我希望有人能帮助我。
答案 0 :(得分:1)
您需要将文件另存为.ts文件而不是.js文件。尝试将其另存为.ts文件
developer.ts