Skip to content

signal ​

Types ​

Connection type ​

luau
type Connection = {
	Disconnect: (self: Connection) -> (),
	Connected: (self: Connection) -> boolean,
}

Handler type ​

luau
type Handler<T...> = (T...) -> ()

Signal type ​

luau
type Signal<T...> = {
	Fire: (self: Signal<T...>, ...any) -> (),
	Connect: (self: Signal<T...>, handler: (...any) -> ()) -> Connection,
	DisconnectAll: (self: Signal<T...>) -> (),
	Count: (self: Signal<T...>) -> number,
}

Functions ​

new ​

luau
signal.new(): any