codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

Fix #71 - cannot iterate void #74

Closed phpnode closed 8 years ago

phpnode commented 8 years ago

This is working around a probable babel type inference issue but it's convoluted enough that I can't pin it down right now. It does seem that when using babel-register it's possible for the plugin ordering to be subtly affected, but I can't see any obvious causes for that. This works around the issue raised in #71 by simply skipping the static check if we detect signs of the problem.

Fixes #71 but not in an ideal way.