mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 15:50:01 +00:00
Merge branch 'finally' into finally-and-cancellation
This commit is contained in:
commit
c55f9f1310
1 changed files with 7 additions and 0 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in a new issue