我想针对ES5,所以我在我的Visual Studio项目文件中设置:
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<TypeScriptTarget>ES5</TypeScriptTarget>
<TypeScriptIncludeComments>false</TypeScriptIncludeComments>
<TypeScriptSourceMap>false</TypeScriptSourceMap>
<TypeScriptModuleKind>AMD</TypeScriptModuleKind>
</PropertyGroup>
但现在我得到error MSB6006: "tsc.exe" exited with code 1.
与ES3我没有得到错误。
在项目文件树中使用标准tsconfig.json文件(VS检测它们)。 BTW以同样的方式用于npm config package.json。