16. implement FirstChar<T>

TypeScript
Is this helpful ?

  - accepted / - tried

Please implement FirstChar<T> to get the first character of a string.

type A = FirstChar<'BFE'> // 'B'
type B = FirstChar<'dev'> // 'd'
type C = FirstChar<''> // never

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

Discuss(8)