preferSingleOverloadUse the single-value sequence overload instead of two identical keypoints.small-rules/prefer-sequence-overloadsPrefer direct ColorSequence and NumberSequence overloads over identical direct arguments and two-keypoint arrays.
new ColorSequence(a, a) is just new ColorSequence(a) with extra typing and overhead. Same for
NumberSequence. And new ColorSequence([a, b]) is the two-keypoint array form when new ColorSequence(a, b) exists and is FAR cheaper to run AND type.
This collapses both cases into the shorter overload. Auto-fixes when the keypoint values match what the
overload expects. Works for ColorSequence and NumberSequence – anything with a Keypoint type.
preferSingleOverloadUse the single-value sequence overload instead of two identical keypoints.preferTwoPointOverloadUse the two-value sequence overload instead of constructing a two-keypoint array.This rule does not accept options.
const gradient = new ColorSequence(new Color3(), new Color3());After auto-fix
const gradient = new ColorSequence(new Color3());new ColorSequence(Color3.fromRGB(100, 200, 255));