Last<T>: T extends [...(infer _), infer R]
    ? R
    : never

Extracts the type info for the last item inside a tuple.

Type Parameters

  • T extends readonly unknown[]

Example

type Value = Last<[true, 1, '2']>;
// => "2"

Generated using TypeDoc