我正在使用 Visual Studio Code 0.10.6 编译一个 TypeScript 1.8 (beta) 项目。编辑器显示“除非提供 '--module' 标志,否则无法编译模块”错误:
但是,我对module
我的财产有价值tsconfig.json
:
{
"compilerOptions": {
"target": "es5",
"module": "system",
"noImplicitReturns": true,
"noImplicitAny": true,
"noFallthroughCasesInSwitch": true,
"preserveConstEnums": true,
"sourceMap": true,
"outDir": "./src/scripts/compiled",
"rootDir": "./src/scripts"
},
"exclude": [
"node_modules",
"jspm_packages"
]
}
该项目编译没有错误(我正在使用gulp-typescript编译我的 TypeScript 文件),并且我已经多次重新启动编辑器。
为什么 Visual Studio Code 显示此错误,即使我的代码编译时没有错误?