<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface A {
    foo: Function;
}

class B implements A {
    constructor() {
        this.foo = () =&gt; {};
    }
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-c1">foo</span>: <span class="pl-smi">Function</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">B</span> <span class="pl-k">implements</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">foo</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Here TypeScript says that <code class="notranslate">B</code> incorrectly implements <code class="notranslate">A</code> and requires <code class="notranslate">B</code> to also have <code class="notranslate">foo</code> property with the same signature. So question is: why I need duplicate definition of properties when implement interface if I cannot override that definition anyway:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface A {
    foo: Function;
}

class B implements A {
    foo: boolean;
    constructor() {
        this.foo = true;
    }
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-c1">foo</span>: <span class="pl-smi">Function</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">B</span> <span class="pl-k">implements</span> <span class="pl-smi">A</span> <span class="pl-kos">{</span>
    <span class="pl-c1">foo</span>: <span class="pl-smi">boolean</span><span class="pl-kos">;</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Here <code class="notranslate">B</code> again incorrectly implements <code class="notranslate">A</code>. Only way to fix it is to add <code class="notranslate">foo:Function</code> to <code class="notranslate">B</code> which absolutely has no point since <code class="notranslate">A</code> already has that.</p>
<p dir="auto"><a href="http://typescript.codeplex.com/workitem/1125" rel="nofollow">http://typescript.codeplex.com/workitem/1125</a></p>
<p dir="auto">Following should be allowed:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface IFoo {
    foo();
}

declare class Foo implements IFoo {}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">IFoo</span> <span class="pl-kos">{</span>
    <span class="pl-c1">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">declare</span> <span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-k">implements</span> <span class="pl-smi">IFoo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">If abstract classes are added in the future, they would inherit all interface methods as abstract (like in Java).</p>