欢迎各位兄弟 发布技术文章
这里的技术是共享的
Closedrohan-paul opened this issue
rohan-paul opened this issue
Steps to Reproduce:
Experimental support for decorators is a feature that is subject to change in a future release. Set the ‘experimentalDecorators’ option to remove this warning. I have the following in my > File/preference/user settings in vscode
Also, in tsconfig.json file in the root directory of my project I have include the following options.
Does this issue occur when all extensions are disabled?: Yes/No |
vscodebot bot assigned mjbvz
vscodebot bot added the typescript label
Contributor
In the TS file, run the |
mjbvz added the needs more info label
In VSCode, Go to File => Preferences => Settings (or Control+comma) and it will open the User Settings file. Add "javascript.implicitProjectConfig.experimentalDecorators": true to the file and it should fix it. It did for me. |
Author
Thanks @gondomar - that solved the issue for now.. |
rohan-paul closed this
EDIT: This was basically the issue caused by an extension called "Javascript and TypeScript Intellisense"..after disabling, the issue is resolved! I have this issue in a javascript project where I am using es6 decorators like example code:
my jsconfig.json file is:
One of the file that gives me this "decorator" warning/error is in the path: I have already tried including and excluding the folders that I wouldn't need etc. Basically, I have wasted my 3 hours trying to figure this thing out.. Any help would be appreciated. |
来自 https://github.com/Microsoft/vscode/issues/45071
关闭rohan-paul 打开了这个问题
rohan-paul 打开了这个问题
重现步骤:
对装饰器的实验支持是一项功能,将来的版本中可能会对其进行更改。设置“ experimentalDecorators”选项以删除此警告。 我在> vscode中的>文件/首选项/用户设置中有以下内容
另外,在我项目的根目录下的tsconfig.json文件中,我包括以下选项。
禁用所有扩展名时会发生此问题吗?:是/否 |
vscodebot 机器人 分配了 mjbvz
vscodebot 机器人 添加了 打字稿 标签
贡献者
在TS文件中,运行 |
mjbvz 添加了 需求更多信息 标签
在VSCode中,转到File => Preferences => Settings(或Control +逗号),它将打开User Settings文件。在文件中添加“ javascript.implicitProjectConfig.experimentalDecorators”:true,它应该对其进行修复。它对我有用。 |
作者
感谢@gondomar- 目前已解决了该问题。 |
rohan-paul 关闭了
编辑:这基本上是由名为“ Javascript and TypeScript Intellisense”的扩展名引起的问题。禁用后,此问题已解决! 我在使用es6装饰器的javascript项目中遇到了这个问题 示例代码:
我的jsconfig.json文件是:
给出此“装饰器”警告/错误的文件之一在路径中: 我已经尝试过包括和排除不需要的文件夹等。 基本上,我已经花了3个小时试图弄清楚这个问题。. 任何帮助,将不胜感激。 |