Gets the type of the last element of a readonly tuple T. If the tuple is empty, it returns never.
T
never
The readonly tuple type.
The type of the last element, or never if T is empty.
type L1 = Tuple.Last<[1, 2, 3]>; // 3type L2 = Tuple.Last<[]>; // nevertype L3 = Tuple.Last<[1]>; // 1 Copy
type L1 = Tuple.Last<[1, 2, 3]>; // 3type L2 = Tuple.Last<[]>; // nevertype L3 = Tuple.Last<[1]>; // 1
Gets the type of the last element of a readonly tuple
T. If the tuple is empty, it returnsnever.