Error: Set the experimentalDecorators option to remove this warning

风流意气都作罢 提交于 2019-12-24 13:44:13

问题


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

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: 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

Code where the error is being reported:

@observable public someVar: dataType;

回答1:


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
  }
}


来源:https://stackoverflow.com/questions/56874063/error-set-the-experimentaldecorators-option-to-remove-this-warning

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!