我已经尝试了很多年,但无论我做什么,我似乎无法让Visual Studio Code intellisense超越单个文件的打字稿.这是在Windows和Ubuntu上.
我已经包含了一个tsconfig.json文件,但它在项目规模上仍然没有任何智能感知.
我目前的测试项目包含以下内容:
tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"out": "test.js"
},
"files": [
"test2.ts",
"tester.ts"
]
}
Run Code Online (Sandbox Code Playgroud)
tasks.json:
{
"version": "0.1.0",
"command": "tsc",
"showOutput": "always",
"windows": {
"command": "tsc.exe"
},
"args": ["-p", "."],
"problemMatcher": "$tsc"
}
Run Code Online (Sandbox Code Playgroud)
test2.ts:
module test
{
export class test2
{
}
}
Run Code Online (Sandbox Code Playgroud)
tester.ts:
module test
{
export class tester
{
public testy: test2;
}
}
Run Code Online (Sandbox Code Playgroud)
在类测试器中,即使我将其更改为test.test2,也不会被intellisense拾取test2.向test2添加变量也无济于事.
有谁知道为什么它根本不起作用的任何可能的原因?