The type signature for Axes.new is wrong

The type signature for the function Axes.new is incorrect. As of release 603, it is <T>(T...) -> Axes but it should be (...Enum.Axis) -> Axes & (...Enum.NormalId) -> Axes. Or at the very least <T>(...T) -> Axes. While the current type signature is not strictly speaking ‘wrong’, it does result in a type error during correct usage and the proposed signature does not.

To reproduce this issue, you can just enter the following into Studio and observe it creates a type error:

Axes.new(Enum.Axis.X)

I hope that this issue with the universally beloved and used Axes type is prioritized and fixed immediately. :stuck_out_tongue:

1 Like

If we wanted to best reflect the behavior, the signature should actually be the following:

(
Enum.Axis|Enum.NormalId?, 
Enum.Axis|Enum.NormalId?, 
Enum.Axis|Enum.NormalId?, 
Enum.Axis|Enum.NormalId?, 
Enum.Axis|Enum.NormalId?, 
Enum.Axis|Enum.NormalId?) -> Axes

This is because Axes.new only considers the first 6 arguments. Likewise, Faces.new should be the following:

(
Enum.NormalId?,
Enum.NormalId?,
Enum.NormalId?,
Enum.NormalId?,
Enum.NormalId?,
Enum.NormalId?) -> Faces

Thanks for the report! We’ll follow up when we have an update for you…