devtypes - v1.1.0
    Preparing search index...

    Type Alias InstanceType<C>

    InstanceType: C extends new (...args: any[]) => I ? I : never

    Extract the instance type from a constructor function.

    Type Parameters

    Returns the type of objects created by a constructor. This is particularly useful when working with factories or DI patterns.

    class User { id: number; name: string; }
    type UserInstance = InstanceType< typeof User >; // User