New Promise Syntax Proposal

Mat At Bread bread at mailed.me.uk
Mon Nov 6 16:02:53 UTC 2017


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 ;
    });
}

```




More information about the es-discuss mailing list