return the type of that collection's entries.
Signature:
export type Entries<T> = Entry<T> extends infer E
? IsNever<E> extends true
? never
: E[]
: nevertype Foo = [1, 2]
type Bar = { a: 1, b: 2 }
// Expect: [0 | 1, 1 | 2]
type EntryType = Entries<Foo>
// Expect: ['a' | 'b', 1 | 2][]
type EntryType2 = Entries<Bar>