Type Script - Class

Create a Class:

FileName: *.ts
Class Customer{
firstName : string;
lastName  : string;

constructor(theFirst:string, theLast:string){
this.firstName = theFirst;
this.lastName = theLast;
}
}

Lets use class,

let mycustomer = new Customer("Vinoth", "Kumar");
console.log(mycustomer.firstName);

Comments

Popular posts from this blog

How to set Java Object into JaxBElement ?

GitLab