摘要: 函数定义 在 JavaScript 中,有两种常见的定义函数的方式——函数声明(Function Declaration)和函数表达式(Function Expression): 函数声明 一个函数有输入和输出,要在 TypeScript 中对其进行约束,需要把输入和输出都考虑到,其中函数声明的类型 阅读全文
posted @ 2018-04-28 15:50 大象踢足球 阅读(253) 评论(0) 推荐(0) 编辑
摘要: TypeScript 数据类型 Boolean 类型 Number 类型 String 类型 Array 类型 Enum 类型 Any (动态类型) let notSure: any = 4; notSure = "maybe a string instead"; notSure = false; 阅读全文
posted @ 2018-04-28 15:33 大象踢足球 阅读(3333) 评论(0) 推荐(0) 编辑