mirror of
https://github.com/Ale32bit-CC/Node.lua
synced 2026-09-17 06:41:24 +00:00
Changed promise.success to promise.bind
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user