Constructor functions

Constructor functions are special functions used to create and initialize objects.

They are most commonly associated with classes, but you can also use them with plain functions to create instances of objects.

Constructor signature

A constructor signature is the type definition of a constructor function. This allows you to define the types of the parameters that the constructor function accepts.

Was this page helpful?