JSFiddle - React, Tailwind, and code Playground

by martinsikora

HTML

<script>
    var JSClass = function() {
      this.start = function() {
        console.log('JSClass.start()');
      }
    }
  </script>

TypeScript

let o1 = new JSClass();
o1.start();

class TSClass extends JSClass {
  start() {
    super.start();
    console.log('TSClass.start()');
  }
  
  otherStart() {
    this.start();
    console.log('TSClass.otherStart()');
  }
}

let o2 = new TSClass();
o2.start();
o2.otherStart();