babel-plugin-rewire
babel-plugin-rewire copied to clipboard
Flow complains about missing export called __RewireAPI__
Whenever I import or use RewireAPI or any of the methods exposed by this plugin, Flow will complain about them because they aren't actually defined/exported by the module I'm using.
Is there any way to suppress these warnings?
You can use // $FlowFixMe
above the offending line.
You can also just add an export on the implementation file. It kinda breaks encapsulation, but... whatever.
export const __RewireAPI__ = {}