TypeScript Inheritance

In this tutorial, you’ll learn about the TypeScript inheritance concept and how to use it to reuse the functionality of another class. Introduction to the TypeScript inheritance A class can reuse the properties and methods of another…

TypeScript Getters and Setters

In this tutorial, you learn how to use the TypeScript getters and setters. Introduction to TypeScript Getters and Setters The following shows a simple Person class with three properties: age, firstName, and lastName: To access any property of the Person class, you…

TypeScript readonly

In this tutorial, you will learn how to use the TypeScript readonly access modifier to mark class properties as immutable property. TypeScript provides the readonly modifier that allows you to mark the properties of a…

TypeScript Access Modifiers

In this tutorial, you will learn about the access modifiers in TypeScript. Access modifiers change the visibility of the properties and methods of a class. TypeScript provides three access modifiers: private protected public Note that TypeScript…

TypeScript Class

In this tutorial, you will learn about the TypeScript Class. Introduction to the TypeScript Class JavaScript does not have a concept of class like other programming languages such as Java and C#. In ES5, you…

TypeScript Optional Parameters

In this tutorial, you will learn how to use the TypeScript optional parameters for functions. In JavaScript, you can call a function without passing any arguments even though the function specifies parameters. Therefore, JaveScript supports…

TypeScript Default Parameters

In this tutorial, you will learn about TypeScript default parameters. Introduction to TypeScript default parameters JavaScript supported default parameters since ES2015 (or ES6) with the following syntax: In this syntax, if you don’t pass arguments or pass…