I am new to typescript and was playing with compilation. Below file after compilation shows two assignments in js file, why is it so?
input file
class Student {
constructor(public fname: string){
this.fname = fname;
}
}
output content
var Student = /** @class */ (function () {
function Student(fname) {
this.fname = fname;
this.fname = fname;
}
return Student;
}());