<p dir="auto">TypeScript is really stingy about the <em>way</em> you call <code class="notranslate">super</code> from the child constructor. I have seen questions on SO e.g. <a href="http://stackoverflow.com/q/28115865/390330" rel="nofollow">this one</a>, where people want to splice and dice arguments they receive from varargs (rest parameters) before passing it on to super. My workarounds have been ugly:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Parent {
    constructor (required1, required2, ...rest) { //...
        if(required1 === undefined) return;
    }
}

class Child extends Parent {
    constructor (...args) {
       super(undefined,undefined); // make the compiler happy
       Parent.apply(this,[val1,val2].concat(args)) // the actual call  
    }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Parent</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span> <span class="pl-kos">(</span><span class="pl-s1">required1</span><span class="pl-kos">,</span> <span class="pl-s1">required2</span><span class="pl-kos">,</span> ...<span class="pl-s1">rest</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-c">//...</span>
        <span class="pl-k">if</span><span class="pl-kos">(</span><span class="pl-s1">required1</span> <span class="pl-c1">===</span> <span class="pl-c1">undefined</span><span class="pl-kos">)</span> <span class="pl-k">return</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">Child</span> <span class="pl-k">extends</span> <span class="pl-smi">Parent</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span> <span class="pl-kos">(</span>...<span class="pl-s1">args</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
       <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-c1">undefined</span><span class="pl-kos">,</span><span class="pl-c1">undefined</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// make the compiler happy</span>
       <span class="pl-smi">Parent</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span><span class="pl-kos">[</span><span class="pl-s1">val1</span><span class="pl-kos">,</span><span class="pl-s1">val2</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-s1">args</span><span class="pl-kos">)</span><span class="pl-kos">)</span> <span class="pl-c">// the actual call  </span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Suggestion: Support <code class="notranslate">super.apply(this, /*any|arr[]*/)</code> as a part of the language grammar.</p>
<p dir="auto">Also tagging <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/Steve-Fenton/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/Steve-Fenton">@Steve-Fenton</a> as he's answered similarly in the past.</p>
<p dir="auto">Hi Team,</p>
<p dir="auto">Please visit the link below:</p>
<p dir="auto"><a href="http://www.typescriptlang.org/Playground#src=interface%20Callback%20%7B%0A%09(param%3A%20number)%3A%20void%3B%0A%7D%0A%0Aclass%20A%20%7B%0A%09%0A%09public%20doSome%20%3D%20(callback%3A%20Callback)%20%3D%3E%20%7B%0A%09%09callback(123)%3B%0A%09%7D%3B%0A%7D%0A%0A%0Alet%20a%20%3D%20new%20A()%3B%0Aa.doSome(%20()%20%3D%3E%20%7B%0A%09console.log(%22tony%22)%3B%0A%7D)%3B" rel="nofollow">http://www.typescriptlang.org/Playground#src=interface%20Callback%20%7B%0A%09(param%3A%20number)%3A%20void%3B%0A%7D%0A%0Aclass%20A%20%7B%0A%09%0A%09public%20doSome%20%3D%20(callback%3A%20Callback)%20%3D%3E%20%7B%0A%09%09callback(123)%3B%0A%09%7D%3B%0A%7D%0A%0A%0Alet%20a%20%3D%20new%20A()%3B%0Aa.doSome(%20()%20%3D%3E%20%7B%0A%09console.log(%22tony%22)%3B%0A%7D)%3B</a></p>
<p dir="auto">a.doSome( () =&gt; {  } ); // should compiler not allow me to do this? since the param is not an optional field.</p>
<p dir="auto">Cheers,</p>
<p dir="auto">-Y</p>