TypeScript Static Example

TypeScript allows creating static members of a class, those that are visible on the class itself rather than on the instances. 

Static members are referenced by the class name.

TypeScript Static Properties Example

In below example, we have two static class members, one is the static property and another static method:
class Employee{
    static fullName: string;

    static getFullName(){
        return Employee.fullName;

// create Employee class object
Employee.fullName = 'Ramesh Fadatare';
Ramesh Fadatare

Read more in the below tutorial

Free Spring Boot Tutorial - 5 Hours Full Course

Watch this course on YouTube at Spring Boot Tutorial | Fee 5 Hours Full Course