Forest Logo
search
package_2

promise

By @cometahn1042f

Roblox

Mirrored

Promise

Promise is a feature-complete asynchronous promise library written in strict Luau, supporting cancellation propagation, consumer tracking, and unhandled rejection detection.

Documentation Index

  • API Reference: Promise construction, combinators, and chaining.
  • Architecture & Design: State transitions and consumer reference counting.
  • Performance & Memory Profile: Asynchronous scheduling with task.defer.
  • Failure Modes & Exception Guarantees: Unhandled rejection warnings and cancellation rules.
  • Executable Examples: Async operations, chaining, and error handling patterns.

Quick Start

local Promise = require(path.to.Promise)

local function fetchData(): Promise
    return Promise.new(function(resolve, reject)
        task.wait(1)
        resolve("Payload")
    end)
end

fetchData():andThen(function(data)
    print("Received:", data)
----------------------------------------
end):catch(function(err)
    warn("Error:", err)
end)

Package Details

Install command (Click to copy)


Version

0.1.3

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.