Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

classes in ts

class Greeter {  greeting: string;
  constructor(message: string) {    this.greeting = message;  }
  greet() {    return "Hello, " + this.greeting;  }}
let greeter = new Greeter("world");Try
Source by www.typescriptlang.org #
 
PREVIOUS NEXT
Tagged: #classes #ts
ADD COMMENT
Topic
Name
6+2 =