Can no longer call a function named `async`
See original GitHub issueLooks like the fix to https://github.com/google/closure-compiler/issues/2244 resulted in a regression in that it disallows calling a function called async
.
Example:
var x = {async: function(){return 3;}}
x.async()
This now results in the following error:
Parse error. No newline allowed before '=>'
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:20 (13 by maintainers)
Top Results From Across the Web
Does an async function always need to be called with await?
Async functions are not necessarily required to have an await call inside it, but the reason behind making a function async is that...
Read more >async function - JavaScript - MDN Web Docs - Mozilla
An async function will return a different reference, whereas Promise.resolve returns the same reference if the given value is a promise. It can...
Read more >Call async from non-async - The Modern JavaScript Tutorial
Just treat async call as promise and attach . then to it: async function wait() { await new Promise(resolve => setTimeout(resolve, 1000)); return...
Read more >Because this call is not awaited, execution of the current ...
The current method calls an async method that returns a Task or a Task<TResult> and doesn't apply the Await operator to the result....
Read more >Is there a way to define a function that can be used as a nomal ...
Well, is a solution, but you have to put all your async code in a folder apart. Can't we apply duck typing to...
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
The ClojureScript compiler is heavy reliant on the Google Closure Compiler. We’re really excited about what the recent developments in processing CommonJS and ES6 modules represent for our community. However, introducing this change relating to the
async
keyword simply breaks every ClojureScript project out there using the immensely popularcore.async
library. My opinion is that, by not reserving the keyword for that usage, we could achieve backwards compatibility.This has come up after we upgraded to the February release and is now a blocker to future upgrades.
At the end of the day, this is obviously your project and you choose how to run it. I just wanted to give my perspective on what the consequences are for ClojureScript.
Sounds like this is much more of a problem than
yield
was. I’m working on fixing it.