背景
软件:vscode
在入门ts过程中,发现以下流程
- 编写文件 helloWorld.ts
- 执行
tsc helloWorld.ts得到 helloWorld.js - html引入helloWorld文件 或通过 node helloWorld.js 得到输出结果
操作麻烦!!!
更方便的方法
npm install typescript ts-node @types/node@* -g- vscode 安装 Code Runner 插件
- 重启vscode
点击三角符号运行 go!go!go!