question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ES7] Basic support for async functions/methods

See original GitHub issue

I 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:closed
  • Created 8 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
not-an-aardvarkcommented, Sep 30, 2016

@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.

1reaction
egoroofcommented, Jan 31, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found