17. implement LastChar<T>

TypeScript

  - accepted / - tried

Similar to FirstChar<T>, please implment LastChar<T> to get the last character.

type A = LastChar<'BFE'> // 'E'type B = LastChar<'dev'> // 'v'type C = LastChar<''> // never

Let's try to solve this problem within 5 minutes.