Top "Ecmascript-next" questions

For questions about upcoming ECMAScript features that are not scheduled to be part of a specific version yet (anything that is a stage 3 or lower proposal).

ESLint unexpected character '@' for JS decorators

I'm trying to use decorators in my JS project, however ESLint is throwing an error stating that the @ symbol is …

javascript eslint ecmascript-next
async / await not working in combination with fetch

I'm trying to use ES7 async / await together with fetch. I know I'm close but I can't get it to …

javascript async-await fetch-api ecmascript-next
Destructure array to object property keys

I have an array of values like: const arr = [1,2,3]; Is there any way I can use destructuring to create the …

javascript destructuring ecmascript-7 ecmascript-next
Async/Await not waiting

I'm running into an issue which I don't fully understand. I feel like there are likely concepts which I haven't …

node.js reactjs webpack babeljs ecmascript-next
Decorators on functions

I see that babel.js decorators (available in "stage 1") implement the spec at https://github.com/wycats/javascript-decorators. It appears …

javascript babeljs decorator ecmascript-next javascript-decorators
Node.js assert.throws with async functions (Promises)

I want to check if an async function throws using assert.throws from the native assert module. I tried with …

javascript node.js async-await assert ecmascript-next
using the ... spread syntax in javascript es6 named exports

I am attempting to import everything from a library as a hash, modify it, and re-export the modified hash, without …

javascript ecmascript-6 babeljs ecmascript-next spread-syntax
How to use async/await with Gulp 4?

I'm trying to do something like this: gulp.task("test", async () => { return gulp.src("**/*.scss") .pipe(print((filePath) => `…

javascript asynchronous gulp async-await ecmascript-next
How can I use decorators today?

I see decorators being used today already in some javascript code. My question is really two fold. First: If decorators …

javascript ecmascript-next angularjs-decorator javascript-decorators
Wrapping promise in async/await

I'm struggling a bit with async/await and returning a value from a Promise. function test () { return new Promise((resolve, …

node.js promise async-await ecmascript-next