InstanceType<T>

The utility type that gives the type of object produced by calling new on class type T.

In more detail

InstanceType<typeof PaymentService> is PaymentService. It lets a factory that receives a class return a correctly typed instance.

Related terms

Taught in

References