<p dir="auto"><strong>TypeScript Version:</strong></p>
<p dir="auto">1.8.10</p>
<p dir="auto"><strong>Code</strong></p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class BaseLayoutModel extends BaseModel {
    constructor(attributes?: any, options?: any) {
        super(attributes, options);
    }
}

export class BaseModel extends Backbone.Model {
    constructor(attributes?: any, options?: any) {
        super(attributes, options);
    }

    destroy(options?: Backbone.ModelDestroyOptions): any {
        const opts = _.extend({
            contentType: &quot;application/json&quot;,
            dataType: &quot;text&quot;
        }, options || {});
        super.destroy(opts);
    }
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">BaseLayoutModel</span> <span class="pl-k">extends</span> <span class="pl-smi">BaseModel</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">attributes</span>?: <span class="pl-smi">any</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">any</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-s1">attributes</span><span class="pl-kos">,</span> <span class="pl-s1">options</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">export</span> <span class="pl-k">class</span> <span class="pl-smi">BaseModel</span> <span class="pl-k">extends</span> <span class="pl-smi">Backbone</span><span class="pl-kos">.</span><span class="pl-c1">Model</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">attributes</span>?: <span class="pl-smi">any</span><span class="pl-kos">,</span> <span class="pl-s1">options</span>?: <span class="pl-smi">any</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-s1">attributes</span><span class="pl-kos">,</span> <span class="pl-s1">options</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-en">destroy</span><span class="pl-kos">(</span><span class="pl-s1">options</span>?: <span class="pl-smi">Backbone</span><span class="pl-kos">.</span><span class="pl-smi">ModelDestroyOptions</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span> <span class="pl-kos">{</span>
        <span class="pl-k">const</span> <span class="pl-s1">opts</span> <span class="pl-c1">=</span> <span class="pl-s1">_</span><span class="pl-kos">.</span><span class="pl-en">extend</span><span class="pl-kos">(</span><span class="pl-kos">{</span>
            <span class="pl-c1">contentType</span>: <span class="pl-s">"application/json"</span><span class="pl-kos">,</span>
            <span class="pl-c1">dataType</span>: <span class="pl-s">"text"</span>
        <span class="pl-kos">}</span><span class="pl-kos">,</span> <span class="pl-s1">options</span> <span class="pl-c1">||</span> <span class="pl-kos">{</span><span class="pl-kos">}</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-en">destroy</span><span class="pl-kos">(</span><span class="pl-s1">opts</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"><strong>Expected behavior:</strong></p>
<p dir="auto"><strong>Actual behavior:</strong><br>
Runtime error. BaseModel  is undefined</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
class B extends A {
    constructor(msg:string) { 
        super(msg);
    }
}

class A {
    constructor(public msg:string) {

    }
}
"><pre class="notranslate"><code class="notranslate">
class B extends A {
    constructor(msg:string) { 
        super(msg);
    }
}

class A {
    constructor(public msg:string) {

    }
}

</code></pre></div>
<p dir="auto">If the super class of B is defined after A you'll get a runtime error.</p>
<p dir="auto">Just tested the above code in the typescript playground and I get the same error</p>