title: Typescript Derived Class Must contain super call on all execution paths
body: <p>Im working on a Derived Class from Map</p>
  
  <p>I have most of it working but i would like to be able to take an array as a param for a constructor, just like Map does. An example</p>
  
  <pre><code>return new Map([...this.entries()].filter(([k, v]) =&gt; search(v)))
  </code></pre>
  
  <p>I'd like to have the option of this in my derived class. My attempt:</p>
  
  <pre><code>constructor();
  constructor(array: ([TKey, TVal])[]);
  constructor(array?: ([TKey, TVal])[]) {
    if (array != null)
      super(array);
    else
       super();
   }
  </code></pre>
  
  <p>However the message I'm getting is:</p>
  
  <blockquote>
    <p>Derived Class Must contain super call on all execution paths </p>
  </blockquote>
  
  <p>I guess It seems like all paths are good to me. how should i approach this? Inmy case? And in general, just in case something with spread or the like solves my specific problem?</p>