Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yetanotherclown/signal

A Typed Signal Implementation similar to RBXScriptSignal for Roblox.
https://github.com/yetanotherclown/signal

luau roblox roblox-library roblox-lua

Last synced: 29 days ago
JSON representation

A Typed Signal Implementation similar to RBXScriptSignal for Roblox.

Awesome Lists containing this project

README

        

# Signal

View docs

A Typed Signal Implementation similar to [`RBXScriptSignal`](https://create.roblox.com/docs/reference/engine/datatypes/RBXScriptSignal) with camelCasing & thread-pooling.

---

#### Features
- Typed
- Thread-Pooling
- Parallel Support

#### Usage
```lua
local Signal = require("signal.lua")

local mySignal = Signal.new()
local myConnection = mySignal:connect(function(...)
print(...)
end)

mySignal:fire("Hello, world!")
-- Prints "Hello, world!"

-- Always disconnect your Connections!
myConnection:disconnect()

-- Or to disconnect all:
mySignal:disconnectAll()
```

#### Building with Rojo

To build yourself, use:
```bash
rojo build -o "Signal.rbxm"
```

Note: Wally does not export types automatically and will display a type-error in one of the Dependencies.
To fix this, see https://github.com/JohnnyMorganz/wally-package-types.

For more help, check out [the Rojo documentation](https://rojo.space/docs).