Defer expression

Darien Valentine valentinium at gmail.com
Wed Aug 16 20:29:01 UTC 2017


Deferring can mean different things, but generally `then` covers this well
(specifically, pushing execution of something to the end of the current
task).

    Promise.resolve().then(stuffToDefer);

I think there is a proposal for `Promise.try(stuffToDefer)`, which would
eliminate the need for the `resolve` bit.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170816/febd76c1/attachment.html>


More information about the es-discuss mailing list