rbx-signal
v0.0.3
Published
BindableEvent wrapper which passes values by reference
Downloads
13
Maintainers
Readme
Signal
BindableEvent wrapper. Passes arguments by reference rather than value.
import Signal from "rbx-signal";
const signal = new Signal<(tab: Array<string>) => void>();
const strings = new Array<string>();
signal.Connect(a => print(a))
print(strings) // table: 2BC04578
signal.Fire(strings) // table: 2BC04578
Corresponding Lua equivalent:
local Signal = require(TS.getModule("rbx-signal", script.Parent));
local signal = Signal.new();
local strings = {};
signal:Connect(function(a)
return print(a);
end);
print(strings);
signal:Fire(strings);