esnext / es6-module-transpiler

Tomorrow’s JavaScript module syntax today
http://esnext.github.io/es6-module-transpiler/
Other
1.21k stars 85 forks source link

Break on deconstruction of arrays in function arguments #196

Closed marcusklaas closed 9 years ago

marcusklaas commented 9 years ago

Transpilation fails on valid ES6 expressions like this:

somePromise.then( ([param1, param2]) => {
    console.log(param2);
});

Error message: Warning: Line 1: Unexpected token => Use --force to continue.

caridy commented 9 years ago

@marcusklaas this project only support ES6 module grammar, arrow function is not supported, you are suppose to transpile that using some other transpiler before passing the code into this transpiler :)

Also, FYI, this project is not longer active, you should migrate to use babeljs or something similar.