流程类型忽略“实验装饰用法”的警告

时间:2017-08-31 07:04:23

标签: javascript reactjs react-native flowtype

我将autobind-decorator bind上下文用于this

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

enter image description here

如何解除此警告?

1 个答案:

答案 0 :(得分:3)

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

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