ts 笔记

 官网学习: https://www.tslang.cn/play/index.html

1. 安装:

// 全局安装:
npm i -g typescript
// 查看版本:
tsc --version

2. 使用:

tsc test.ts

 3. 省点心

tsc --init // 生成 tsconfig.json
// 修改些文件
"outDir": "./dist",
"rootDir": "./src",
// 执行时 直接 tsc 就生成js了

 

 

 

 

 

 

 

.

posted @ 2020-11-30 17:03  James2019  阅读(78)  评论(0编辑  收藏  举报