BindableEncodingUtils
Encodes and decodes arguments so they can survive a trip through a BindableEvent or BindableFunction. Roblox copies tables sent over a bindable and rejects functions and userdata outright, so those values are wrapped in a closure which the receiving side calls to retrieve the original reference.
Functions
encode
BindableEncodingUtils.encode(...: any) → ...anyEncodes arguments for transfer over a bindable. Namely this will convert any table into a closure so the receiver gets the original value instead of a copy.
encodeCallback
BindableEncodingUtils.encodeCallback(callback: function) → ()Encodes a given callback so it can be assigned to a BindableFunction
invokeEncodedBindableFunction
BindableEncodingUtils.invokeEncodedBindableFunction(...: any) → anyInvokes a BindableFunction with encoded arguments and decodes the results.
decode
BindableEncodingUtils.decode(...: any) → ...anyDecodes arguments encoded by BindableEncodingUtils.encode.