1、安装
npm install -g typescript
2、新建一个文件
index.ts
3、编译成.js文件
tsc index.ts
4、在vscode中使用typescript,先创建tsconfig.json
tsc --init
5、终端>运行任务>tsc:watch-tsconfig.json 点击一下
6、修改生成的.js文件存放位置
tsconfig.json中 "outDir":"新位置"
7、修改.ts文件的内容 会自动生成.js文件
8.....