-
Notifications
You must be signed in to change notification settings - Fork 12
Promise.catch
should allow to widen promise type
#57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Ok just found #32 that discusses exactly this problem. Feel free to close if this is still the way to go here. Although I think it is inconsistent compared with the "lax" definition of "Promise.then". |
BTW, in #32 there one can read "That being said, I wouldn't mind making the callback function of .catch mandatory." which did not happen as it seems. |
I kind of think that making the |
Yes. |
@uhyo Somehow I cannot build the project, calling |
Thank you for working on this! I think you need to run:
and:
|
Thanks I will try and if I succeed, will add this to |
Promise.catch
can be used to silence rejections and to make the result optional by converting rejections toundefined
(or more generally, to add any other result type to the promise chain). This is not possible anymore with better-ts-lib:Could you add a
catch<U>
similar to the existingthen<U>
?The text was updated successfully, but these errors were encountered: