There’s a solid red bar in the editor.
function debugWrap<T>(name: string, func: (player: Player, ...) -> (T)): (player: Player, ...) -> (T)
However, when replacing either of the ellipses with any, the red bar goes away.
function debugWrap<T>(name: string, func: (player: Player, any) -> (T)): (player: Player, ...) -> (T)
Typing it into the command bar, it tells me this is apparently an invalid type.
> function debugWrap<T>(name: string, func: (player: Player, ...) -> (T)): (player: Player, ...) -> (T) end - Studio
(...): Expected type, got ')' - Studio
I can’t replace the ellipses with another type parameter, because it would only then accept one argument.
The input function signature and the output function signature should be the same.
What is the correct way to add type hints to my code?