If a property has a getter but no setter (or vice versa) than perhaps the attempt to set or get should be flagged as an error:
classFields{getReadOnly(){return10;}publicwritten:number;setWriteOnly(value:number){this.written=value;}}varobj=newFields();console.log(obj.ReadOnly);// 10obj.ReadOnly=20;// cannot set but no error console.log(obj.ReadOnly)// 10 obj.WriteOnly=20;console.log(obj.written)// 20 console.log(obj.WriteOnly);// cannot read but no error No biggie. But something to be aware of. (ported from http://typescript.codeplex.com/workitem/834)
If a property has a getter but no setter (or vice versa) than perhaps the attempt to set or get should be flagged as an error:
No biggie. But something to be aware of. (ported from http://typescript.codeplex.com/workitem/834)