安装 TypeScript npm 包

TypeScript以下简称tc,tc是由微软开发的开源编程语言,相当于javascript的超集。

语法特性

类 classes

接口 interfaces

模块Modules

类型注解Type annotations

编译时类型检查Compile time type checking 

Arrow 函数 (类似 C# 的 Lambda 表达式)

安装 TypeScript npm 包:npm install -g typescript

接着在安装的目录新建一个helloworld.ts的文件,在cmd中输入tsc helloworld.ts

在目录中生成helloworld.js表示安装成功,将ts文件转换为js文件


你可能感兴趣的:(安装 TypeScript npm 包)