流类型关闭“实验性装饰器使用”警告

Val*_*Val 4 javascript reactjs flowtype react-native

我使用上下文来.autobind-decorator bindthis

但我收到警告/错误 Experimental decorator usage (Decorators are an early stage proposal that may change)

在此处输入图片说明

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

Ros*_*mon 7

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

这是 Flow 文档中对这个标志的解释。