摘要: 一、类型注解(Type annotation) 所谓类型注解,就是人为为一个变量指定类型,例如: const a: number = 123; 在 vscode 中鼠标移入 a 出现提示,冒号后面就是类型注解: 当不添加类型注解时,TypesScript 也能知道变量 a 是一个数字,这就是 Typ 阅读全文
posted @ 2020-07-22 22:17 Leophen 阅读(2065) 评论(0) 推荐(0) 编辑