typescript file extensions 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
});