title: Typescript Inheritance, how to define a data member used in parent but defined in subclasses
body: <pre><code>class Parent {
     foo: number;
     protected value: number;
     constructor(foo) { this.foo = foo }
     some_function() { return this.foo + this.val }
  }
  
  class childClass extends Parent {
     constructor(foo) { super(foo); this.value = 10;
  }
  </code></pre>
  <p>The problem with the above code is that value is only defined in the subclass and not the Parent. That would make the Parent incomplete.
  How do I define or set value considering its definition will only be defined in the child class</p>