error TS2637: Variance annotations are only supported in type aliases for object, function, constructor, and mapped types.

Broken Code ❌

type Pair<in T> = [T, T];

Fixed Code ✔️

Variance annotations only make sense if variance is considered while resolving the type alias. Since tuples and arrays are always type-checked covariantly, they do nothing in this case and thus raise the error.

To resolve the error, simply remove the variance annotation.

type Pair<T> = [T, T];