21. implement LastItem<T>
Share
- accepted / - tried
Similar to 19. FirstItem<T>, please implement LastItem<T>
to obtain last item of a tuple type.
type A = LastItem<[string, number, boolean]> // booleantype B = LastItem<['B', 'F', 'E']> // 'E'type C = LastItem<[]> // never