Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/yetanotherclown/signal
- Owner: YetAnotherClown
- License: mit
- Created: 2023-03-12T06:23:08.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T10:11:05.000Z (over 1 year ago)
- Last Synced: 2023-09-20T22:32:17.239Z (over 1 year ago)
- Topics: luau, roblox, roblox-library, roblox-lua
- Language: Lua
- Homepage: https://yetanotherclown.github.io/Signal/
- Size: 741 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Signal
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).