无法在VSCode中打开文件,也是简单的编译错误

时间:2016-01-05 17:55:33

标签: javascript typescript visual-studio-code

我刚刚安装了VSCODE,创建了一个简单的HelloWorld.ts文件,当我尝试编译它时说它无法找到该文件?

编译错误是:

预期 HelloWorld(3,9)

不确定这里发生了什么?

enter image description here

tsconfig.json:

{
    "compilerOptions": {
        "target": "es5",
        "module": "amd",
        "sourceMap": true
    }  
} 

tasks.json:

{
    "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 HelloWorld program to compile.
    "args": ["HelloWorld.ts"],

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

0 个答案:

没有答案