class A
{
protected _value:number;
get value()
{
return this._value;
}
}
class B extends A
{
set value(v:number)
{
this._value = v;
}
}
var b = new B();
b.value = 2;
console.log(b.value);//undefined
If a subclass defines only a setter, it won't be able to access the value.
I believe that using Object.defineProperty to set "value" on B.prototype could potentially override the getter and setter on A.prototype.