// TypeScript 静态类型
//永远是数据类型,不可改变
let count : number =1;
count = 2 //正确
// count ='jspang' //错误
//定义类, 其余地方调用 自定义静态类型
interface xiaojiejie{
uname:string,
age:number
}
//类型不可修改。
const xiaohong:xiaojiejie={
uname:'小红',
age:18
}
console.log(xiaohong.age);