的Visual Studio 2015年RC打字稿实验装饰错误 [英] Visual Studio 2015 RC Typescript experimental decorators error
问题描述
我如何禁用下面的错误在VS2015?
有关装饰 TS1219支持实验是一个特点,就是在将来的版本中改变。指定--experimentalDecorators删除此警告。
我试图用Angular2注解。我尝试添加手动以下为没有运气的项目文件:
< TypeScriptExperimentalDecorators>真< / TypeScriptExperimentalDecorators>
我也安装打字稿1.5.0测试版的扩展。
<一个href=\"https://github.com/Microsoft/TypeScript/issues/3934\">https://github.com/Microsoft/TypeScript/issues/3934
如果你有一个项目文件,tsconfig将不予以受理。该项目文件需要precedence。我们仍然冲洗VS项目和您可以指定在两种编译器选项的tsconfig之间的整合故事。
所以要禁用错误信息,右键单击项目文件,卸载项目,然后右键单击编辑项目文件,在文件的结尾应该有一个配置部分,添加:
&LT;的PropertyGroup条件='$(配置)'=='调试'&GT;
....
&LT; TypeScriptExperimentalDecorators&GT;真&LT; / TypeScriptExperimentalDecorators&GT;
&LT; /&的PropertyGroup GT;
保存和重新加载。
您可能还需要TypeScriptEmitDecoratorMetadata映射--emitDecroatorMetadata P>
块引用>How do I disable the following error in VS2015?
TS1219 Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning.
I'm trying to use Angular2 annotations. I tried adding the following manually to the project file with no luck:
<TypeScriptExperimentalDecorators>True</TypeScriptExperimentalDecorators>
I've also install the TypeScript 1.5.0 beta extension.
解决方案https://github.com/Microsoft/TypeScript/issues/3934
If you have a project file, tsconfig will not be honored. the project file takes precedence. We are still flushing the integration story between a VS project and a tsconfig as you can specify compiler options in both.
so to disable the error message, right-click on project file, unload project, then right-click edit the project file, At the end of the file there should be a config section, add:
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> .... <TypeScriptExperimentalDecorators>true</TypeScriptExperimentalDecorators> </PropertyGroup>
save and reload.
You may also need TypeScriptEmitDecoratorMetadata to map --emitDecroatorMetadata
这篇关于的Visual Studio 2015年RC打字稿实验装饰错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!