Closer to the proposed `Promise.try`, in that it starts synchronously. Also, normal `do` expressions are stage 1 currently, and the core concept hasn't changed much in the several years of the proposal's existence. (It's based on statement completion values, like `eval`.)
On Thu, Aug 17, 2017, 16:17 Tab Atkins Jr. <jackalm...@gmail.com> wrote: > On Thu, Aug 17, 2017 at 12:12 PM, Matthew Robb <matthewwr...@gmail.com> > wrote: > > Honestly have there been any proposals for something like `do async { // > can > > await here }` which would produce a promise in the enclosing scope > > Do-expressions haven't advanced in general yet, but if/when they do, > this seems like it might be reasonable. It's just sugar for the > `Promise.resolve().then(()=>{...})` expression, right? > > ~TJ > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss