<p dir="auto">I am using some type definitions that follow the pattern below and that have been compiling up until commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/TypeScript/commit/d71af8a3fb485880866e097cbb6963d5aab62678/hovercard" href="https://github.com/microsoft/TypeScript/commit/d71af8a3fb485880866e097cbb6963d5aab62678"><tt>d71af8a</tt></a></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare module MyModule {
  class Foo extends Foo.__Class {}
  module Foo {
    class __Class {
      constructor(x: number, y: number);
    }
  }
}"><pre class="notranslate"><span class="pl-k">declare</span> module <span class="pl-smi">MyModule</span> <span class="pl-kos">{</span>
  <span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-k">extends</span> <span class="pl-smi">Foo</span><span class="pl-kos">.</span><span class="pl-c1">__Class</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
  module <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
    <span class="pl-k">class</span> <span class="pl-smi">__Class</span> <span class="pl-kos">{</span>
      <span class="pl-c1">constructor</span><span class="pl-kos">(</span><span class="pl-s1">x</span>: <span class="pl-smi">number</span><span class="pl-kos">,</span> <span class="pl-s1">y</span>: <span class="pl-smi">number</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">After commit <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/microsoft/TypeScript/commit/d71af8a3fb485880866e097cbb6963d5aab62678/hovercard" href="https://github.com/microsoft/TypeScript/commit/d71af8a3fb485880866e097cbb6963d5aab62678"><tt>d71af8a</tt></a> I'm getting errors like<br>
<code class="notranslate">error TS2506: 'Foo' is referenced directly or indirectly in its own base expression.</code></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>