TypeScript

Getters and Setters in TypeScript

Inheritance TypeScript Tutorial structural or duck typing The Getters and Setters are known as accessor properties in TypeScript. They look like normal properties but are actually functions mapped to a Property. We use “get” to define a getter method and “set” to define a setter method. The Setter method runs when we assign a value to the Property.

Getters and Setters in TypeScript Read More »

Inheritance in TypeScript

Inheritance in TypeScript enables you to create a new class by using the existing class. The new class will reuse the properties and methods of the existing class. It may also modify the behavior of the existing class by adding its own properties and methods. Inheritance can be single-level or multi-level. But a Class can extend only from a single Class. In this tutorial, we will learn inheritance in Typescript. Learn method overriding, property overriding, etc. Also look at the effects of inheritance on the visibility of the properties like public, private, protected, etc. We also learn how to override readonly & optional properties etc

Inheritance in TypeScript Read More »

Scroll to Top