Wednesday, May 31, 2017

How to create a class in Type Script?

Customer.Ts:

class CustomerDetails{

}

In Type script, for each Type Script (.ts) files it will generate Java Script (.js) file with the same file name.

The above code will render in Customer.js file as below:

var CustomerDetails= (function(){
  *****
  *****
  *****
return CustomerDetails;
}());

No comments:

Post a Comment