基本类型(小写哦) booleannumberstringnullundefinedobject数组 (1) let arr : number[] : [1,2,3]; (2) let arr Array<number> = [1,2,3]; 元组 let x: [string, number]; x = ['hello', 10]; 枚举enum enum Color { Red = '傻妞', Green = '美女', Blue = '小可爱' }; let c: Color = Color.Blue; c//小可爱 any 任意值 let notSure: any = 4; let list: any[] = [1, true, "free"]; viod function warnUser(): void { alert("This is my warning message");//木有返回值 } never 接口interface interface Person { readonly id: number;//只读属性 name: string;//一般属性 age?: number;//可选属性 [propName: string]: any;//任意属性 } let tom: Person = { id: 89757, name: 'Tom', gender: 'male' };