Takes the last N elements from a readonly array or tuple T.
If T is a tuple, it returns a new tuple containing the last N elements.
If T is a general array, it returns the original array type T.
Type Parameters
Nextendsnumber
The number of elements to take.
Textendsreadonlyunknown[]
The readonly array or tuple type.
Returns
A new type containing the last N elements (for tuples) or T (for arrays).
Takes the last
Nelements from a readonly array or tupleT. IfTis a tuple, it returns a new tuple containing the lastNelements. IfTis a general array, it returns the original array typeT.