types are associated with run-time valaues
dynamically typed language
static type, less error-prone
type checking is not done in runtime but before compiling or during development
ts file is compiled down to js
extra features
shape of an object, better maintenance and autocomplete
为JavaScript添加了静态类型
通过TypeScript compiler或Babel转译为JavaScript
静态类型在开发阶段就可以减少bug从而在一定程度上提升开发效率
ts








网友评论