I want to create a type where an array has a minimum length of N. I have looked at this TypeScript array with minimum length , but when N is large, I do not want to write out the type from 0 to N, e.g. :
type ArrayTwoOrMore<T> = {
0: T
1: T
...
N: T
}
I was wondering whether there was a neater way of doing this?