`Promise.try` calls its callback synchronously like `new Promise` does, so
it would not be a substitute for this case.

On Wed, Aug 16, 2017 at 1:29 PM, Darien Valentine <[email protected]>
wrote:

> 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.
>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to