Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 477 Bytes

File metadata and controls

24 lines (14 loc) · 477 Bytes

Home > types-kit > ArrayEntry

ArrayEntry type

return the type of that array's entry.

Signature:

export type ArrayEntry<T extends readonly unknown[]> = [number, T[number]]

Example

type Foo = [1, 2]

// Expect: [number, 1 | 2]
type EntryType = ArrayEntry<Foo>