VSCode typescript ctrl + shift + b工作正常,但编辑后intellisence无法找到符号

时间:2016-03-09 18:21:04

标签: typescript visual-studio-code

我在vscode中遇到打字稿智能问题。我使用tsconfig.json.vscode/tasks.json构建项目很好,但是一旦我编辑文件,我就会在特定文件中未定义的任何内容下获得红线。有没有办法将增量/自动编译器指向我的tsconfig.json?

编辑:我可以通过在我的文件中使用显式/// <reference来解决此问题,但我更愿意看一下tsconfig.json

1 个答案:

答案 0 :(得分:0)

如果发送&#34; -w&#34;它可以正常工作作为一个论点。

例如:

{
    "version": "0.1.0",

    // The command is tsc. Assumes that tsc has been installed using npm install -g typescript
    "command": "tsc",

    // The command is a shell script
    "isShellCommand": true,

    // Show the output window only if unrecognized errors occur.
    "showOutput": "silent",

    // args is the watch argument 
    "args": ["-w"],

    // use the standard tsc problem matcher to find compile problems
    // in the output.
    "problemMatcher": "$tsc"
}

请记住,VS Code会以任何方式突出显示代码问题。除非你有更复杂的设置,否则我会说这已经足够了。