[英]TypeScript installed, but not being recognized by VS Code or Windows
[英]VS Code and Typescript watch: Files are being recompiled without being saved
我正在开发一个Typescript项目,并运行“ tsc -w”以使其在编辑时保持编译状态。
问题是,即使我不保存文件,有时也会重新编译我的文件。 有时它会随机重新编译我没有碰过的文件(例如,如果我在打字稿中打开现有文件开始编辑)
这是代码吗? 还是打字稿? 有谁知道阻止这种情况发生的解决方案?
我的.tsconfig在下面
{
"compilerOptions": {
"target": "es2015",
"module": "es2015",
"allowJs": false,
"jsx": "react",
"sourceMap": true,
"outDir": "build",
"baseUrl": ".",
"paths": {
"@shared/*": [ "src/shared/*" ],
"@app/*": ["src/*"]
},
"strict": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"experimentalDecorators": true,
"skipLibCheck": true,
},
"filesGlob": [
"src/**/*.ts",
"src/**/*.tsx",
],
"types": [
"react",
"react-dom",
"react-native"
],
"exclude": [
"build",
"**/node_modules/*",
"jest.config.js",
"App.js"
],
"include": [
"./src",
],
"compileOnSave": false
}
原来,我不必运行单独的Typescript监视过程-自从我开始项目以来,Expo Typescript的支持得到了改善。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.