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 tuple or array type from the types of a constructor function type. It produces a tuple type with all the parameter types (or the type never if Type is not a function).
typeT0=ConstructorParameters<ErrorConstructor>;// type T0 = [message?: string]typeT1=ConstructorParameters<FunctionConstructor>;// type T1 = string[]typeT2=ConstructorParameters<RegExpConstructor>;// type T2 = [pattern: string | RegExp, flags?: string]typeT3=ConstructorParameters<any>;// type T3 = unknown[]typeT4=ConstructorParameters<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 = never
The text was updated successfully, but these errors were encountered:
/** * Obtain the parameters of a constructor function type in a tuple */typeConstructorParameters<Textendsabstractnew(...args: any)=>any>=Textendsabstractnew(...args: infer P)=>any ? P : never;
Constructs a tuple or array type from the types of a constructor function type. It produces a tuple type with all the parameter types (or the type never if Type is not a function).
The text was updated successfully, but these errors were encountered: