Type alias ValuesInside<T>

ValuesInside<T>: T extends ReadonlyArray<infer R>
    ? R
    : never

Extracts the type info for all items inside an array or tuple.

Type Parameters

  • T extends readonly unknown[]

Example

type Values = ValuesInside<[true, 1, '2']>;
// => true | 1 | "2"

Generated using TypeDoc