ClassCtor<T, P>: (new (...args: P) => T)

Type of constructor. This makes it easier to describe the type of argument for a function.

Type Parameters

  • T
  • P extends any[] = any[]

instead

function (ctor: { new (...args: any[]): StringField }) { ... }

can be described

function (ctor: ClassCtor<StringField>) { ... }

second parameter P could describe params for constructor