title: Structural typing and Polymorphism - Adding super types
body: <p>Below is an example code(polymorphic) taken from <a href="https://github.com/angular/angular" rel="nofollow noreferrer">angular framework</a> using TypeScript syntax,</p>
  
  <pre><code>export abstract class AbstractControlDirective {
     ...
  }
  </code></pre>
  
  <hr>
  
  <p><strong><code>AbstractControlDirective</code> subtypes</strong></p>
  
  <pre><code>export abstract class NgControl extends AbstractControlDirective {
       ...
  }
  export abstract class ControlContainer extends AbstractControlDirective {
     ...
  }
  export declare abstract class ControlContainer extends AbstractControlDirective {
    ...
  }
  export declare abstract class NgControl extends AbstractControlDirective {
      ...
  }
  </code></pre>
  
  <hr>
  
  <p><strong><code>NgControl</code> subtypes</strong></p>
  
  <pre><code>export class NgModel extends NgControl implements OnChanges, OnDestroy {
     ...
  }
  
  export class FormControlDirective extends NgControl implements OnChanges {
      ....
  }
  
  export class FormControlName extends NgControl implements OnChanges, OnDestroy {
     ...
  }
  
  export declare class FormControlDirective extends NgControl implements OnChanges {
      ...
  }
  
  export declare class FormControlName extends NgControl implements OnChanges, OnDestroy {
     ...
  }
  
  export declare class NgModel extends NgControl implements OnChanges, OnDestroy {
     ...
  }
  </code></pre>
  
  <p>In general, there are many situations, that came across new requirements, to add obvious looking super type in intermediate layers of class hierarchy, that injects breakage in subtypes, unless using some design pattern. Using design pattern can make the class hierarchy less error prone but breaks the hierarchy structure.</p>
  
  <hr>
  
  <p>To avoid this problem, Can we maintain this hierarchy without using <code>extends</code> keyword? TypeScript being structural typed...</p>