Use .catch as an alias for .fail to support the official spec.
Closed this issue · 5 comments
RangerMauve commented
Hey, it seems that the Promise implementation that is coming with JavaScript is going to be using .catch()
instead of .fail()
for catching rejected promises. Do you think you could support this method in order to be more compatible with the spec?
nicks commented
sure, i think we would accept a patch for this.
RangerMauve commented
Cool, I'll put it on my TODO list
RangerMauve commented
A quick question first:
Am I correct to assume that the constructor doesn't take a single function with resolve
and reject
as parameters like the native implementation?
If so, then it might just end up being confusing if it has .catch()
but isn't used the exact same way.
nicks commented
right.
RangerMauve commented
Yeah, in that case it might be better to just leave .fail
as the only way to catch (other than .then
)