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

Code Example 1

class Person {

  private firstName: string;
  private lastName: string;

  constructor(firstName: string, lastName: string) {
    this.firstName = firstName;
    this.lastName = lastName;
  }

  public getFullName() {
    return `${this.firstName} ${this.lastName}`;
  }
}

export = Person;

Learn ReactJs, React Native from akashmittal.com