Porting babel-plugin-transform-for-of-as-array into transform-for-of as an option (#6914)

This commit is contained in:
Raja Sekar
2017-12-01 04:18:56 +05:30
committed by Henry Zhu
parent d8bbaaae0a
commit a992d06c41
28 changed files with 192 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
let elm;
for (elm of array) {
console.log(elm);
}

View File

@@ -0,0 +1,4 @@
{
"plugins": [["transform-for-of", { "assumeArray": true, "loose": true}]],
"throws": "The loose and assumeArray options cannot be used together in @babel/plugin-transform-for-of"
}