我使用 autobind-decorator
bind
上下文到 this
。
但是我得到了警告/错误 Experimental decorator usage(Decorators 是一个可能会改变的早期提案)
我怎样才能消除这个警告?
最佳答案
您需要在 .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/