I know I'm conceptually wrong somewhere here, but how would you arrange this type of situation? I think my confusion would be clear from the code below:
class Base {
constructor() {
this._defineProperties( this.properties );
}
_defineProperties(properties) {
properties.forEach((value, key) => {
Object.defineProperties(this, key, {
value: value,
enumerable: true
})
});
}
}
class Child extends Base {
properties: {
'title': '',
'text': ''
}
}
const obj = new Child();
child.title
child.text