typescript有两种使用方法
- 直接用typescript使用
- 和其他框架使用,react,vue等
简单 使用
1.安装
npm install -g typescript
2.使用
tsc hello.ts
vscode配置自动编译
1. 初始化typescript
tsc --init
然后修改tsconfig.json中输出

2.监视配置文件
在vscode中:终端---》监视任务

然后就可以愉快写typescript了
typescript有两种使用方法
npm install -g typescript
tsc hello.ts
tsc --init
然后修改tsconfig.json中输出
在vscode中:终端---》监视任务
然后就可以愉快写typescript了
本文标题:typescript使用
本文链接:https://www.haomeiwen.com/subject/ytxprctx.html
网友评论