Open KamasamaK opened 5 years ago
+1
This nearly stopped me from using this library 😬
Thanks @KamasamaK for confirming
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.
Promise.prototype.finally
is introduced in ES2018, but the README indicates that it is "not available".