NumProps

source

Get the number of properties in T as a literal number type.

type NumProps<T> = UnionToTuple<keyof T>["length"];