Medium/kew

Use .catch as an alias for .fail to support the official spec.

Closed this issue · 5 comments

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?

sure, i think we would accept a patch for this.

Cool, I'll put it on my TODO list

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.

right.

Yeah, in that case it might be better to just leave .fail as the only way to catch (other than .then)