typescript extend base class object property
<p>First and foremost, I apologize, I'm completely new to OO programming and I'm sure there is a better way to word this question ( one that would probably yield a search result or 10 ). </p>

<p>So to make my life easy and to explain what I want to do here's code</p>

<pre><code>class A {
  propertyA = {
    itemA: "a",
    itemB: "b".
    itemC: "c"
  }
  propertyB = {
    itemA: "A"
  }
}
class B extends A {
  propertyA.itemD = "d";
  propertyB.itemB = "B";
}
</code></pre>

<p>I get an error when I try to do this. I basically need the base class to be a template and extend a few things here and there with the extending class. Otherwise it only needs all the other properties ( I just don't want to retype them for each class )</p>