TypeScript Classes
Below is code example: In above example, whenever new keyword is used , it invoke the constructor and create new object for Greet. A constructor is a special function of the class that is responsible for initialising the variables of the class. in above example, it will initialise message with string “hello world”.