删除 Visual Studio Code 中的装饰器错误 [英] Remove decorators error in Visual Studio Code

查看:36
本文介绍了删除 Visual Studio Code 中的装饰器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要了

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

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

在经过修饰的 JavaScript 类上.

On a decorated JavaScript class.

我的 JavaScript 文件根目录下的 jsconfig.json 文件如下所示.

My jsconfig.json file, at the root of my JavaScript files, looks like this.

{
    "experimentalDecorators": true
}

我做错了什么?

推荐答案

我相信你的 jsconfig.json 应该是:

I believe your jsconfig.json should instead be:

{
    "compilerOptions": {
        "experimentalDecorators": true
    }
}

这篇关于删除 Visual Studio Code 中的装饰器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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