错误:设置experimentalDecorators选项以删除此警告 [英] Error: Set the experimentalDecorators option to remove this warning

查看:1010
本文介绍了错误:设置experimentalDecorators选项以删除此警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用赛普拉斯3.3.1版。我收到以下错误:

I'm using Cypress version 3.3.1. I'm getting the following error:


错误: TS1219:对装饰器的实验性支持是一项功能,将来可能会更改释放。设置'experimentalDecorators'选项以删除此警告。

Error: "TS1219: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning."

PS:我设置了 experimentalDecorators:true tsconfig.json 中的
尝试了以下操作,但没有成功: https: //github.com/cypress-io/eslint-plugin-dev/issues/4

PS: I've set "experimentalDecorators": true in tsconfig.json. Tried the following but it didn't work: https://github.com/cypress-io/eslint-plugin-dev/issues/4

报告错误的代码:

@observable public someVar: dataType;


推荐答案

我创建了 tsconfig。 json 放在测试目录下,即 my_project / __ tests __ / integration / tsconfig.json 并设置 experimentalDecorators true

I created the tsconfig.json under the test directory, i.e. my_project/__tests__/integration/tsconfig.json and set the experimentalDecorators as true.

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

这篇关于错误:设置experimentalDecorators选项以删除此警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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