Skip to content

Commit

Permalink
Merge pull request #204 from SigmaThetaTech/main
Browse files Browse the repository at this point in the history
Corrects Signal + Event.OnClientEvent: PlayerSignal + Event.OnServerEvent: Signal type errors
  • Loading branch information
Sleitnick authored Aug 1, 2024
2 parents 6789a1f + 3360c42 commit 4e9611f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions modules/typed-remote/init.luau
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
--!strict

type Signal<T...> = {
Connect: (self: PlayerSignal<T...>, fn: (T...) -> ()) -> RBXScriptConnection,
ConnectParallel: (self: PlayerSignal<T...>, fn: (T...) -> ()) -> RBXScriptConnection,
Once: (self: PlayerSignal<T...>, fn: (T...) -> ()) -> RBXScriptConnection,
Wait: (self: PlayerSignal<T...>) -> T...,
Connect: (self: Signal<T...>, fn: (T...) -> ()) -> RBXScriptConnection,
ConnectParallel: (self: Signal<T...>, fn: (T...) -> ()) -> RBXScriptConnection,
Once: (self: Signal<T...>, fn: (T...) -> ()) -> RBXScriptConnection,
Wait: (self: Signal<T...>) -> T...,
}

type PlayerSignal<T...> = {
Expand All @@ -17,15 +17,15 @@ type PlayerSignal<T...> = {
--[=[
@within TypedRemote
@interface Event<T...>
.OnClientEvent PlayerSignal<T...>,
.OnServerEvent Signal<T...>,
.OnClientEvent Signal<T...>,
.OnServerEvent PlayerSignal<T...>,
.FireClient (self: Event<T...>, player: Player, T...) -> (),
.FireAllClients (self: Event<T...>, T...) -> (),
.FireServer (self: Event<T...>, T...) -> (),
]=]
export type Event<T...> = Instance & {
OnClientEvent: PlayerSignal<T...>,
OnServerEvent: Signal<T...>,
OnClientEvent: Signal<T...>,
OnServerEvent: PlayerSignal<T...>,
FireClient: (self: Event<T...>, player: Player, T...) -> (),
FireAllClients: (self: Event<T...>, T...) -> (),
FireServer: (self: Event<T...>, T...) -> (),
Expand Down
2 changes: 1 addition & 1 deletion modules/typed-remote/wally.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "sleitnick/typed-remote"
description = "Simple networking package for typed RemoteEvents and RemoteFunctions"
version = "0.1.0"
version = "0.2.0"
license = "MIT"
authors = ["Stephen Leitnick"]
registry = "https://github.com/UpliftGames/wally-index"
Expand Down

0 comments on commit 4e9611f

Please sign in to comment.