Skip to content

Releases: morgann1/promise-luau

Release list

v4.1.0

Choose a tag to compare

@github-actions github-actions released this 01 Oct 18:17

Added

  • The library is written in strict Luau and exports generic types: Promise<T...>, AnyPromise, Status, Error, ErrorKind, Executor<T...>, and SignalLike<T...>. See the readme for how far the types follow a chain.

Changed

  • The source moved from lib/init.lua to src/init.luau.
  • The Wally package now contains only the library, default.project.json, the license, the readme, and the changelog.
  • Promise.defer now uses task.defer instead of waiting for the next Heartbeat. This has different behavior: while the deferred code will still run at the end of the frame, it runs alongside other Lua wake-ups which moves its position in the frame. Also, if you call Promise.defer from inside of an already-deferred thread/Promise, the code will run after your current thread/Promise is finished, during the same frame, rather than on the next frame.
  • Promise.delay now wraps task.delay. This shouldn't result in any noticeable behavior changes, but changes in behavior are still possible as we don't have direct control over how Roblox's task scheduler works.