RbxUtil icon indicating copy to clipboard operation
RbxUtil copied to clipboard

TypedRemote: Fix OnClientEvent

Open Ultrasonic1209 opened this issue 1 year ago • 0 comments

At the moment, OnClientEvent connections to valid handlers get warnings as the typechecker erroneously asserts that OnClientEvent handlers must have a Player instance as their first parameter.

Changes:

  1. The Signal type's methods now use Signal for its methods' self parameters, instead of PlayerSignal.
  2. The Event type's OnServerEvent and OnClientEvent typings have been swapped to reflect that OnClientEvent handlers do not receive any player object, but OnServerEvent handlers do, hence why OnServerEvent handlers should be PlayerSignals instead.

Ultrasonic1209 avatar Jul 12 '24 12:07 Ultrasonic1209