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