.
......................................................................................................................
TypeScript 教程入门指南详解案例教程
.......................................................................................................................
一、简介..................................................................................................................................................................2
1.1Typescript 诞生.........................................................................................................................................3
1.2Typescript 前景.........................................................................................................................................3
1.3Typescript 特性.........................................................................................................................................3
1.4Typescript 工具.........................................................................................................................................5
1.5Typescript 开源.........................................................................................................................................5
二、TypeScript 安装..............................................................................................................................................6
2
.1Typescript 安装图解过程........................................................................................................................ 6
.2Typescript 安装前注意事项.....................................................................................................................6
2
三、TypeScript 基本类型......................................................................................................................................7
3.1Typescript 基本类型使用........................................................................................................................ 7
3.2Typescript 基本 void,string 类型..........................................................................................................11
3.3Typescript 基本 void,any,Array 类型.................................................................................................. 13
四、TypeScript 接口........................................................................................................................................... 16
4.1 最简单接口使用.....................................................................................................................................16
4.2 自选属性 Optional Properties............................................................................................................. 17
4.3JavaScript 的 search 函数...................................................................................................................19
4.4 接口定义 Array 类型............................................................................................................................. 21
4.5class 实现 implements 接口................................................................................................................. 22
4.6 扩展接口 Extending Interfaces....................................................................................................23
4.7 混合型 Hybrid Types......................................................................................................................... 24
五、TypeScript 类............................................................................................................................................... 25
5.1 最简单 class 使用..................................................................................................................................25
5.2 在 class 使用 constructor 关键字................................................................................................... 26
5.3 在 class 使用 super 关键字..................................................................................................................27
5.4 在 class 使用 public/private 关键字.............................................................................................31