evaera / roblox-lua-promise

Promise implementation for Roblox
https://eryn.io/roblox-lua-promise/
MIT License
281 stars 78 forks source link

Promise.fromEvent as command #94

Closed DanielDorDev closed 1 year ago

DanielDorDev commented 1 year ago

I'm trying to find a solution how to use Promise.fromEvent so

Promise.fromEvent(robloxEvent)
 :tap(function ()
    print("event occurred")
end)

Will be triggered each time the event fires, is there known guide how to do this? or walkaround ?

Thanks 🙏

evaera commented 1 year ago

Just connect to the event, you don't need promises for this