Indi
小熊写字的地方 blog.skrskrskrskr.com

Jordan Harband 提出了 Promise.prototype.finally 这一章节的提案。 如何工作? .finally() 这样用: promise .then(result => {···}) .catch(error => {···}) .finally(() => {···}); finally 的回调总是会被执行。作为比较: then 的回调只有当 promise 为 f…

讨论

还没有评论,来说第一句吧。

小熊写字的地方 的其他文章