[ES7] Basic support for async functions/methods
See original GitHub issueI use them in many projects notably for class methods because the syntax prevents me from easily using workarounds such as Bluebird.coroutine(function * generator() {})
.
Unfortunately doing so breaks parsing and prevents EsLint from finding other errors.
I understand that fully implementing async functions could be a lot of work and that it is not a priority to support ES7 features for now but a preliminary support such as simply removing them from the source would at least allows the parsing of the rest of the code.
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
ES7 async functions - JakeArchibald.com
With async functions (full proposal), you can await on a promise. This halts the function in a non-blocking way, waits for the promise...
Read more >async function - JavaScript - MDN Web Docs - Mozilla
The async function declaration declares an async function where the await keyword is permitted within the function body. The async and await ...
Read more >A Primer on ES7 Async Functions - Code - Envato Tuts+
For our first example, we'll do something really simple: calling an asynchronous function and logging the value it returns.
Read more >Javascript async-await: How to Use ES7 async ... - AppDividend
The async-await is a new technique to write async code in sync function. You can write it as a simple synchronous function. That...
Read more >Async functions | Can I use... Support tables for HTML5, CSS3 ...
Async functions. - OTHER. Async functions make it possible to treat functions returning Promise objects as if they were synchronous. Usage % of....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@benjamine This issue is a bit out-of-date; if you’re using ESLint 3.6.0 or higher, you can now use
parserOptions: {ecmaVersion: 8}
in your config to enable async/await.Want this too. 😢 Currently I use
babel-eslint
which isn’t a good solution - eslint parses transpiled code which I didn’t write and catches errors in that.