All Downloads are FREE. Search and download functionalities are using the official Maven repository.

typescript.script.ts Maven / Gradle / Ivy

The newest version!

class Greeter {
  greeting: string;
  constructor (message: string) {
    this.greeting = message;
  }
  greet() {
    return "Hello, " + this.greeting;
  }
}   

var greeter = new Greeter("world");

var button = document.createElement('button')
button.innerText = "Say Hello"
button.onclick = function() {
  alert(greeter.greet())
}

document.body.appendChild(button)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy