Mic*_*lus 10 typescript tsconfig visual-studio-code
这个问题类似于这个问题:How to use different tsconfig file for tests? 但我要求 Visual Studio 代码。
我有两个tsconfig文件:
tsconfig.json 对于所有应用程序文件tsconfig.test.json 对于所有测试文件tsconfig.jsonexclude all*.spec.ts而tsconfig.test.json只包含这些文件。
如何让 Visual Studio 代码了解打开的.spec.ts文件属于tsconfig.test.json?
我不想将我的所有测试分开到一个test包含它自己的目录中,tsconfig.json而是将它们放在应用程序文件旁边。
yav*_*lan 10
tsconfig.jsonVS Code目前仅限于单个(请参阅:https: //github.com/microsoft/vscode/issues/12463)。
考虑到项目结构是:
创建./src/tsconfig.json包含内容的文件:
{
"extends": "../tsconfig.test.json"
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2869 次 |
| 最近记录: |