class Book{
public title : string;
public year : number;
constructor( title :string ,year:number){
this.title = title;
this.year = year ;
}
}
var details = new Book("werr",2017);
console.log(details);
我还是打字稿的初学者。非常感谢任何帮助。