mirror of
https://github.com/Ale32bit-CC/Node.lua
synced 2024-09-27 21:58:13 +00:00
Changed promise.success to promise.bind
This commit is contained in:
parent
1bf6f7d525
commit
3869ced4ba
2
node.lua
2
node.lua
@ -192,7 +192,7 @@ local function promise(func, errorOnUncaught) -- errorOnUncaught is temporary
|
|||||||
promise.status = "pending" -- "resolved", "rejected"
|
promise.status = "pending" -- "resolved", "rejected"
|
||||||
promise.value = nil
|
promise.value = nil
|
||||||
|
|
||||||
promise.success = function(func)
|
promise.bind = function(func)
|
||||||
assert(type(func) == "function", "bad argument (expected function, got ".. type(func) ..")")
|
assert(type(func) == "function", "bad argument (expected function, got ".. type(func) ..")")
|
||||||
promise.__then = func
|
promise.__then = func
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user