Today, a spline can be created from a list of all Vector2s, Vector3s, or CFrames. Many spline methods accept arguments of type Vector2 | Vector3 | CFrame, but the type checker does not know that each argument will have the same type in the intersection. For example, there are a few instances where the type checker dislikes a:Lerp(b) because it does not know that a and b are both Vector2s, Vector3s, or CFrames. This issue also extends to users since many methods return Vector2 | Vector3 even though the user knows which type they used to create the spline.
Today, a spline can be created from a list of all Vector2s, Vector3s, or CFrames. Many spline methods accept arguments of type
Vector2 | Vector3 | CFrame
, but the type checker does not know that each argument will have the same type in the intersection. For example, there are a few instances where the type checker dislikesa:Lerp(b)
because it does not know thata
andb
are both Vector2s, Vector3s, or CFrames. This issue also extends to users since many methods returnVector2 | Vector3
even though the user knows which type they used to create the spline.