I created the following gist as a proposal for the addition of a `finally`
method to the prototype of the Promise constructor, either for ES6 (if such a
thing is considered valuable and could be fast tracked at this date), or for
ES7. This method would take in a single callback that would be
Here is the current design for Promise.prototype.finally. I agree it is a
useful feature.
https://github.com/domenic/promises-unwrapping/issues/18
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Yes. Needed it recently.
Ended up doing .then(f).catch(f) which can be survived but feels stupid.
David
Le 18/08/2014 21:20, Domenic Denicola a écrit :
Here is the current design for Promise.prototype.finally. I agree it is a
useful feature.
On Mon, Aug 18, 2014 at 12:30 PM, David Bruant bruan...@gmail.com wrote:
Yes. Needed it recently.
Ended up doing .then(f).catch(f) which can be survived but feels stupid.
And doesn't have the correct pass-through behavior, unless you've got
a switch in f that makes it return or throw based on
From: Domenic Denicola dome...@domenicdenicola.com
Sent: Monday, August 18, 2014 3:20 PM
To: Ron Buckton; EcmaScript
Subject: RE: Proposal: Promise.prototype.Finally
Here is the current design for Promise.prototype.finally. I agree it is a
useful feature.
https://github.com/domenic
Is the consensus that this won't make it into Promise until at least ES7, and
then only if there's enough of a call for it?
Although I find the arbitrary division of features into ES6 and ES7
distasteful personally: yes, ES6 will not be adding new APIs. That doesn't mean
that
6 matches
Mail list logo