index.d.ts declare protected member code example
Example: typescript extension getter
interface A {
testGet: SomeType|null;
}
Object.defineProperty(A.prototype, "testGet", {
get (this: A) {
if(this.something) {
return this.something;
}
return null;
},
enumerable: false,
configurable: true
});