Merge branch 'finally' into finally-and-cancellation

This commit is contained in:
Eryn Lynn 2018-10-23 19:16:15 -04:00
commit c55f9f1310

View file

@ -314,6 +314,13 @@ function Promise.prototype:cancel()
end
end
--[[
Used to set a callback for when the promise resolves OR rejects.
]]
function Promise.prototype:finally(finallyCallback)
return self:andThen(finallyCallback, finallyCallback)
end
--[[
Yield until the promise is completed.