Cancelable promises proposal
curvedmark at gmail.com
Wed Aug 5 00:32:00 UTC 2015
> On Aug 4, 2015, at 1:32 PM, Andrea Giammarchi <andrea.giammarchi at gmail.com> wrote:
> only promises that has passed through their initialization the callback would be cancelable,and this could be reflected through a `.cancelable` property
That's precisely the problem. When you made a mistake and thought a function should have the ability to abort, you wouldn't reflect that `.cancelable` property, you would simply call abort(). Passing a different object makes this less likely to happen since it's not thenable.
> and pragmatists would never find out what should be the behavior once aborted 'cause Promise can only reject and never be ignored.
What do you think of the ignore() method I proposed?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss