Check out example codes for "typescript constructor shorthand". It will help you in understanding the concepts better.

Code Example 1

// Imagine you have following code, let’s say you have class User:

class User {
  private name: string;
  private surname: string;
  private age: number;

  constructor(name: string, surname: string, age: number) {
    this.name = name;
    this.surname = surname;
    this.age = age;
  }
}

// You can write same class using shorter syntax:
class User {
  constructor(
    private name: string,
    private surname: string,
    private age: number
  ) {}
}

Learn ReactJs, React Native from akashmittal.com