Answers for "ts class"

5

classes in typescript

class Info {
  private name: string ;
  constructor(n:string){
    this.name = n ;
  };
  describe(){
    console.log(`Your name is  ${this.name}`);
  }
}

const a = new Info('joyous');
a.describe();
Posted by: Guest on October-17-2020
0

ts class

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

let greeter = new Greeter("world");Try
Posted by: Guest on March-29-2021
0

classes in ts

class Greeter {  greeting: string;
  constructor(message: string) {    this.greeting = message;  }
  greet() {    return "Hello, " + this.greeting;  }}
let greeter = new Greeter("world");Try
Posted by: Guest on April-24-2021
0

export interface typescript

interface Props {}
export interface IRefered {
  name: string
}
Posted by: Guest on November-15-2020

Code answers related to "TypeScript"

Browse Popular Code Answers by Language