Closed nodegin closed 8 years ago
It's not a bug, as mentioned in the README:
Note: Kneden only supports transpiling ES5 with the addition of async/await. If you're using other ES6 features (like arrow functions, let/const, classes, etc.), make sure you transpile them down to valid ES5 code first using the babel es2015 preset. See #19 for more information.
Thanks for testing and reporting, though!
Here's a quick test, consider the following code:
Which transpiles to:
The
Math.PI
doesn't getting logged,If I reorder the line of
const a = Math.PI
to after the await statement:Which would prints out the PI successfully.
I suppose both should log the PI in console correctly
Is this a bug? thanks.