http://www.typescriptlang.org/docs/index.html
var book: string = "hellp angular 2";
var num: number = 123;
function lg (msg :string): void{
console.log(msg)
}
类和接口
interface Shape{
area(): number;
}
class Rectangle implements Shape{
constructor(
private number.
private length: number
){}
//实现方法
area(){
return this.width * this.length;
}
}
装饰器