我在新的TypeScript核心项目类型中使用ASP.NET。
我们积极地使用装潢工。
不幸的是,这会导致VS2015输出中出现大量错误:
Error TS1219 Experimental support for decorators is a feature that is subject to change in a future release.
Specify '--experimentalDecorators' to remove this warning.
WebApplication2 d:\documents\visual studio 2015\Projects\WebApplication2\src\WebApplication2\wwwroot\sources\app.ts 9 Active处理这些错误消息非常简单,在常规ASP.NET项目中修改*.csproj文件。
但是ASP.NET核心项目不使用.csproj,而是使用.xproj。
那么,如何在TypeScript核心项目的VS2015中允许实验性的ASP.NET装饰器支持呢?
您可能会发现最简单的项目,它复制了问题在样本中github代表
发布于 2016-02-17 16:23:50
Add > New Item。Client-side。TypeScript JSON Configuration File。将其保留为tsconfig.json的默认名称。tsconfig.json.在complierOptions部分中,添加"experimentalDecorators": true。"wwwroot"部分中删除"exclude"。以下是我的tsconfig.json文件的完整性:
{
"compilerOptions": {
"noImplicitAny": false,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"experimentalDecorators": true
},
"exclude": [
"node_modules"
]
}https://stackoverflow.com/questions/35460232
复制相似问题