I proposed an enhanced definition for `async return` and `async throw` to address this issue in https://github.com/tc39/ecmascript-asyncawait/issues/38 – it didn’t get accepted, however it is implemented in rodent (see https://github.com/MatAtBread/nodent#exiting-async-functions-from-callbacks)

Using it would produce an async function like:

```javascript


async function requestInput(question) {
   interface.question(question, function(input) {
       async return input ;
   });
}

```


_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to