I can create a type for an array of N element of string type:
type A = string[];
as well as a predefined number of elements, such as exactly 2 elements:
type A = [string, string];
What I am trying to have is a type that will accept 2 or more elements, but not just one or none.
type A = ?
A = ['a', 'b']; // OK
A = ['a', 'b', 'c']; // OK
A = ['a', 'b', ... 'N']; // OK
A = ['a']; // Error
A = []; // Error
Is this possible?
let a: A = ['a', 'b']or something?