Currently, it is too difficult to correctly typecast the Event
property on BindableEvent objects.
Right now there are two implementations we can approach
- using
RBXScriptSignal
as is, which means you lose autocomplete in the function when another script attempts to use the event - creating a close pair with RBXScriptSignal that provides the information, however, it creates typecasting errors and you lose automatic API upgrades
Many libraries utilise the Event
part of BIndableEvent to provide a RBXScriptSignal surface for events, even the legacy chat service has, however, none of these libraries are able to properly cast their events in a way thats 1, seamless, 2 friendly to the user with autocompletes.
If Roblox were to address this issue it would improve my development experience as I’d be able to create libraries and objects with RBXScriptSignal
types that are properly casted to show what data is sent through the event.
Design Idea
RBXScriptSignal<T...> = {Connect: (T...) -> () --and so on