Construct signatures

JavaScript functions can be invoked with the new operator, which creates a special object that is referred to as an instance. TypeScript refers to these as constructors, because they usually "construct" a new object.

You can write a construct signature by adding the new keyword in front of a call signature.

Loading TypeScript...

Was this page helpful?