美文网首页
typescript使用

typescript使用

作者: 夏夏夏夏顿天 | 来源:发表于2020-04-07 14:35 被阅读0次

typescript有两种使用方法

  1. 直接用typescript使用
  2. 和其他框架使用,react,vue等

简单 使用

1.安装

npm install -g typescript

2.使用

tsc hello.ts

vscode配置自动编译

1. 初始化typescript

tsc --init

然后修改tsconfig.json中输出

image.png

2.监视配置文件

在vscode中:终端---》监视任务


image.png

然后就可以愉快写typescript了

相关文章

网友评论

      本文标题:typescript使用

      本文链接:https://www.haomeiwen.com/subject/ytxprctx.html