13. implement InstanceType<T>

Is this helpful ?

from all members: - accepted / - tried

For a constructor function type T, InstanceType<T> returns the instance type.

Please implement MyInstanceType<T> by yourself.

class Foo {}
type A = MyInstanceType<typeof Foo> // Foo
type B = MyInstanceType<() => string> // Error

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