You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constructs a type consisting of the instance type of a constructor function in Type.
classC{x=0;y=0;}typeT0=InstanceType<typeofC>;// type T0 = CtypeT1=InstanceType<any>;// type T1 = anytypeT2=InstanceType<never>;// type T2 = nevertypeT3=InstanceType<string>;// Type 'string' does not satisfy the constraint 'abstract new (...args: any) => any'. // type T3 = anytypeT4=InstanceType<Function>;// Type 'Function' does not satisfy the constraint 'abstract new (...args: any) => any'.// Type 'Function' provides no match for the signature 'new (...args: any): any'. // type T4 = any
The text was updated successfully, but these errors were encountered:
/** * Obtain the return type of a constructor function type */typeInstanceType<Textendsabstractnew(...args: any)=>any>=Textendsabstractnew(...args: any)=> infer R ? R : any;
Constructs a type consisting of the instance type of a constructor function in Type.
The text was updated successfully, but these errors were encountered: