Typescript type guard for requiring all elements

前端 未结 3 1949
旧时难觅i
旧时难觅i 2021-01-21 17:54

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

3条回答
提交回复
热议问题