[英]How to get VSCode to not check other .ts files in directory for variable conflicts?
I have a React app with a directory of TypeScript scripts which I use to run admin tasks, etc. I execute them with npm scripts in the package.json
file, eg
"ts001test": "./node_modules/.bin/ts-node --skip-project scripts/ts_codeExamples/ts001_test.ts"
效果很好。 ( --skip-project
阻止 ts-node rom 加载.tsconfig
文件)
但是,当其中两个脚本具有相同的变量时, VSCode 会抱怨我无法重新声明另一个文件中的相同变量。
我如何告诉 VSCode 将这些 TypeScript 文件中的每一个文件与它们自己的 scope 一起处理,而不是查看其他文件以查看变量是否已在其他地方使用?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.