創(chuàng)建 tsconfig.json
tsc
編譯器不會檢測該文件是否存在使用 tsc -p jsconfig.json
創(chuàng)建
隱藏build 后的js 文件
在.vscode
中的配置文件值作用于當前項目
在setting.json
文件設置
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/*.js": { "when": "$(basename).ts" },
"**/**.js": { "when": "$(basename).tsx" }
安裝指定版本 typescript
npm install --save-dev typescript@2.2.1
安裝本地匹配版本:
npm install --save-dev typescript
VS 命令
-
ctr +
` 控制臺 -
command + shift + p
命令面板