Closed
Description
if you create a "property" with a public getter and no setter. if you then try to set that property typescript doesn't tell you this isn't allowed. But it sure will blow up your code.
private _date: Date;
public get Date()
{
return this._date;
}
In the above scenario if you do
this.Date = new Date();
typescript allows this without catching anything (no red underbar or error), but the javascript doesn't allow it. Changing the code to the below code works as expected.
this._date = new Date();