Skip to content
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

Support .finally(...) #30

Open
KamasamaK opened this issue Nov 10, 2018 · 4 comments
Open

Support .finally(...) #30

KamasamaK opened this issue Nov 10, 2018 · 4 comments
Labels
Bump Minor Bump minor version once released

Comments

@KamasamaK
Copy link

Promise.prototype.finally is introduced in ES2018, but the README indicates that it is "not available".

@ainthek
Copy link

ainthek commented Jan 7, 2019

+1

@analog-nico analog-nico added the Bump Minor Bump minor version once released label Feb 14, 2019
@tbjgolden
Copy link
Contributor

This nearly stopped me from using this library 😬

Thanks @KamasamaK for confirming

@tbjgolden
Copy link
Contributor

added a pr:
#46

@analog-nico
Copy link
Member

I just merged @tbjgolden ’s PR #46 which clarifies this. With node v10 and above you can write these:

rp(...)
    .then(...)
    .catch(...)
    .finally(...)
rp(...)
    .catch(...)
    .finally(...)
rp(...)
    .then(...)
    .finally(...)

But not:

rp(...)
    .finally(...)

Until the direct finally call is supported, you can use:

rp(...).promise()
    .finally(...)

I leave this issue open until that last case without using .promise() is supported as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bump Minor Bump minor version once released
Projects
None yet
Development

No branches or pull requests

4 participants