vscode:[ts]对装饰器的实验支持是一个可能会发生变化的功能 [英] vscode: [ts] Experimental support for decorators is a feature that is subject to change

查看:332
本文介绍了vscode:[ts]对装饰器的实验支持是一个可能会发生变化的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了[ts]对装饰器的实验性支持是一个在未来版本中可能会发生变化的功能。设置'experimentalDecorators'选项以删除此警告。

I'm getting "[ts] Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."

我是Angular的新手,我不知道如何解决它。

I'm new to Angular and I don't how to solve it.

我的tsconfig.json文件:

My tsconfig.json file :

{  
"compilerOptions":{  
  "allowSyntheticDefaultImports":true,
  "declaration":false,
  "emitDecoratorMetadata":true,
  "experimentalDecorators":true,
  "lib":[  
     "dom",
     "es2015"
  ],
  "module":"es2015",
  "moduleResolution":"node",
  "sourceMap":true,
  "target":"es5"
},
"include":[  
   "src/**/*.ts"
],
"exclude":[  
   "node_modules"
],
"compileOnSave":false,
"atom":{  
   "rewriteTsconfig":false
 } 

}

打印:

推荐答案

您已在src文件夹中打开了编辑器。要使用vscode的语言服务来查找tsconfig,您需要在保存配置的项目的真根上打开编辑器。

You've opened the editor on the src folder. For vscode's language service to find your tsconfig, you need to open the editor on the true root of the project holding your config.

在根文件夹上打开:

Opened on root folder:

在src文件夹上打开:

Opened on src folder:

这篇关于vscode:[ts]对装饰器的实验支持是一个可能会发生变化的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆