12. implement ReturnType<T>

Is this helpful ?

from all members: - accepted / - tried

Similar to Parameters<T>, ReturnType<T>, as the name says itself, returns the return type of function type T.

Please implement MyReturnType<T> by yourself.

type Foo = () => {a: string}

type A = MyReturnType<Foo> // {a: string}

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