mirror of
https://github.com/AmberGraceRblx/luau-promise.git
synced 2025-04-24 23:50:03 +00:00
Add promise:finally
This commit is contained in:
parent
3b30a3fa70
commit
4b95be24d5
1 changed files with 7 additions and 0 deletions
|
@ -290,6 +290,13 @@ function Promise.prototype:catch(failureCallback)
|
||||||
return self:andThen(nil, failureCallback)
|
return self:andThen(nil, failureCallback)
|
||||||
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.
|
Yield until the promise is completed.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue