I was recently going through the typescript documentations
reference: http://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html
in this documentation, there is similar typescript
code related to section classes
as follows
class Student {
fullName: string;
constructor(public firstName: string) {
this.fullName = firstName;
}
}
interface Person {
firstName: string;
}
function greeter(person : Person) {
return "Hello, " + person.firstName;
}
let user = new Student("Jane");
document.body.innerHTML = greeter(user);
I compiled
this code with tsc filename.ts
It's giving me a javascript compiled code as
var Student = /** @class */ (function () {
function Student(firstName) {
this.firstName = firstName;
this.fullName = firstName;
}
return Student;
}());
function greeter(person) {
return "Hello, " + person.firstName;
}
var user = new Student("Jane");
document.body.innerHTML = greeter(user);
In this generated javascript code I want to know this part:
var Student = /** @class */ (function () {
function Student(firstName) {
this.firstName = firstName;
this.fullName = firstName;
}
return Student;
}());
I want someone to help me with good references for Javascript basics for this.