Skip to content

AIDC Toolkit / Core / Constructor

Type Alias: Constructor()<TConstructorParameters, TConstructorInstance> ​

Constructor<TConstructorParameters, TConstructorInstance> = (...args) => TConstructorInstance

Defined in: type.ts:29

Arbitrary constructor. An arbitrary constructor doesn't have to be an exact match to a constructor; the only requirements are that TConstructorParameters have compatible types (exact or wider types of the actual constructor parameters) and that TConstructorInstance be a compatible type (exact or narrower type of the actual constructor instance).

Type Parameters ​

TConstructorParameters ​

TConstructorParameters extends unknown[]

Constructor parameters types.

TConstructorInstance ​

TConstructorInstance

Constructor instance type.

Parameters ​

args ​

...TConstructorParameters

Returns ​

TConstructorInstance