NetanelBasal
1/15/2017 - 4:49 PM

timeout2.ts

class Greeter {
  greeting: string;
  constructor(message: string) {
    this.greeting = message;
  }
  greet() {
    setTimeout(() => {
      console.log(`Hello ${this.greeting}`);
      // more stuff
    }, 2000);
  }
}

new Greeter("world").greet();