gcanti / babel-plugin-tcomb

Babel plugin for static and runtime type checking using Flow and tcomb
MIT License
482 stars 22 forks source link

"ReactClass is not defined" error #165

Closed omerzach closed 7 years ago

omerzach commented 7 years ago

Trying to enable babel-plugin-tcomb for my codebase but getting this error in my connect function:

Uncaught ReferenceError: ReactClass is not defined
    at connect (connect.js:8)

I totally believe my types are incorrect here, but I think ReactClass is a real thing? https://github.com/facebook/flow/blob/master/lib/react.js#L96

Here's my code: https://gist.github.com/omerzach/c94285c8626154736b85576f19f1d6e6

gcanti commented 7 years ago

You have to configure the plugin (https://github.com/gcanti/babel-plugin-tcomb#globals-arrayobject) when using a global type

omerzach commented 7 years ago

👌 thanks!