@turing6/promise
v2.0.5
Published
A promise, you already know what it does.
Downloads
5
Readme
Promise
A promise, you already know what it does.
Installation
npm install @turing6/promise
Usage
Create a promise:
local promise = Promise.new(function(resolve, reject, onCancel)
task.wait(5)
resolve(60, "hi!")
end)
Handle a promise:
-- the given function is run when the resolve function is called and gets the arguments passed to -- the resolve function.
promise:AndThen(function(num, string)
print(num, string)
end)