Is there a way to require array elements with typescript so that I can do have
type E = keyof T; // Number of properties in T is unknown
let T
You can create a tuple:
type E = "el1"|"el2"|"el3"; type ITestElement = { arg: T }; type ITestElements = [ITestElement<"el1">, ITestElement<"el2">, ITestElement<"el3">];