javascript - `Experimental decorator usage` 的流类型消除警告

标签 javascript reactjs react-native flowtype

我使用 autobind-decorator bind 上下文到 this

但是我得到了警告/错误 Experimental decorator usage(Decorators 是一个可能会改变的早期提案)

enter image description here

我怎样才能消除这个警告?

最佳答案

您需要在 .flowconfig 文件的 [options] 部分下添加 esproposal.decorators=ignore。请注意,Flow 不会理解您添加的装饰器的任何类型含义,它只会忽略它们。

Here is the explanation for this flag in the Flow documentation.

关于javascript - `Experimental decorator usage` 的流类型消除警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45975255/

相关文章:

php - 将 json 对象传递给数组 - 自动完成

javascript - Highcharts x 轴日期时间问题

javascript - facebook 连接 javascript sdk 在 IE 中不起作用?

reactjs - 如何在 React Native 中加密数据(使用 Expo)

reactjs - 如何使用两个 useEffect 语句测试钩子(Hook)?

javascript - 如何使我的搜索栏在 React Native 中正常工作?

react-native - 获得了屏幕 'component' 的 'children' 和 'Search' Prop 。你只能通过其中之一

ios - react-native run-ios 在连接到 iOS 模拟器时遇到问题

javascript - HTML5 方向轴跳转

javascript - 常量值作为数组元素给出错误