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

TypeError: "Expected strategies to be iterable, got Array" in for of loop #96

Closed panrafal closed 8 years ago

panrafal commented 8 years ago

Looping over an array with for ... of throws this error: TypeError: Expected strategies to be iterable, got Array

const strategies = []
for (const strategy of strategies) {}

I would assume, that Array is pretty much iterable. This happens with the newest Babel (v 6.3.21), with babel-plugin-transform-runtime

phpnode commented 8 years ago

I couldn't replicate this directly but I added a potential mitigation for this in 3.6.0 which just came out.