proposal-async-do-expressions
proposal-async-do-expressions copied to clipboard
async `do` expressions for JavaScript
Consider something like this: ```js let res = async do { fetch("https://some.url"); } ``` The return value (here assigned to `res`) from a `do async { .. }` block is...
Some code from the [recent Deno 1.9 release blog post](https://deno.com/blog/v1.9): ```js for await (const conn of Deno.listen({ port: 4500 })) { (async () => { for await (const { respondWith...
```js function x(a) { return async do { await sleep(2000) arguments[0] = 1 } } ```
This is not an issue, but provide an use case of the proposal which can be add to readme. Async functions always return a promise, if there is any error...
Please explain to us why you think it's needed to add the async keyword. This should already work with the current do proposal. no need to add any `async` keyword....
Have you considered options like: ```js let res1 = do async { .. } // (edited mistake) let res2 = do.async { .. } let res3 = async.do { .....