1.安装 TypeScript
$ npm install -g typescript
2.验证 TypeScript
$ tsc -v # Version 4.0.2
3.编译 TypeScript 文件
$ tsc helloworld.ts # helloworld.ts => helloworld.js
2024-02-08 13:06:04
$ npm install -g typescript
$ tsc -v # Version 4.0.2
$ tsc helloworld.ts # helloworld.ts => helloworld.js