<p dir="auto">Please see comments:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface ObjectHash {
    [key: string]: any;
}

var hash: ObjectHash;

hash = {
    &quot;key&quot;: &quot;value&quot;
}

declare class Model {
    defaults: ObjectHash;
}

class MyModel1 extends Model { // Okay
    defaults = hash;
}

class MyModel2 extends Model { // Why ERROR?!
    defaults = {
        &quot;key&quot;: &quot;value&quot;
    };
}

class MyModel3 extends Model { // Okay
    defaults: ObjectHash = {
        &quot;key&quot;: &quot;value&quot;
    };
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">ObjectHash</span> <span class="pl-kos">{</span>
    <span class="pl-kos">[</span><span class="pl-s1">key</span>: <span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">var</span> <span class="pl-s1">hash</span>: <span class="pl-smi">ObjectHash</span><span class="pl-kos">;</span>

<span class="pl-s1">hash</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-s">"key"</span>: <span class="pl-s">"value"</span>
<span class="pl-kos">}</span>

<span class="pl-k">declare</span> <span class="pl-k">class</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span>
    <span class="pl-c1">defaults</span>: <span class="pl-smi">ObjectHash</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">MyModel1</span> <span class="pl-k">extends</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span> <span class="pl-c">// Okay</span>
    <span class="pl-c1">defaults</span> <span class="pl-c1">=</span> <span class="pl-s1">hash</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">MyModel2</span> <span class="pl-k">extends</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span> <span class="pl-c">// Why ERROR?!</span>
    <span class="pl-c1">defaults</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
        <span class="pl-s">"key"</span>: <span class="pl-s">"value"</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">MyModel3</span> <span class="pl-k">extends</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span> <span class="pl-c">// Okay</span>
    <span class="pl-c1">defaults</span>: <span class="pl-smi">ObjectHash</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
        <span class="pl-s">"key"</span>: <span class="pl-s">"value"</span>
    <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto">Hi,</p>
<p dir="auto">I think this is a bug. Please see comments for details:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface ObjectHash {
    [key: string]: any;
}

// OK   
var defaults: ObjectHash = {
    title: &quot;untitled&quot;,
};

// This is error, expected
defaults = [&quot;a&quot;];

declare class Model {
    defaults: ObjectHash
}

// Index signatures of types '{ title: string }' and 'ObjectHash' are incompatibe.
// Why?! Unexpected error.
class MyModel extends Model {
    defaults = {
        title: &quot;untitled&quot;
    };
}

// It works when assigned in the constructor
class MyModel1 extends Model {
    constructor() {
        // OK
        this.defaults = {
            title: &quot;untitled&quot;
        }       
        super();
    }
}

// Trying different way
declare class Model2 {
    // 'defaults' is method
    defaults(): ObjectHash
}

// Same here. Why is this an error? Is this a bug?
class MyModel2 extends Model2 {
    defaults() {
        return {
            title: &quot;untitled&quot;
        }
    }
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">ObjectHash</span> <span class="pl-kos">{</span>
    <span class="pl-kos">[</span><span class="pl-s1">key</span>: <span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-c">// OK   </span>
<span class="pl-k">var</span> <span class="pl-s1">defaults</span>: <span class="pl-smi">ObjectHash</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
    <span class="pl-c1">title</span>: <span class="pl-s">"untitled"</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span><span class="pl-kos">;</span>

<span class="pl-c">// This is error, expected</span>
<span class="pl-s1">defaults</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-s">"a"</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">Model</span> <span class="pl-kos">{</span>
    <span class="pl-c1">defaults</span>: <span class="pl-smi">ObjectHash</span>
<span class="pl-kos">}</span>

<span class="pl-c">// Index signatures of types '{ title: string }' and 'ObjectHash' are incompatibe.</span>
<span class="pl-c">// Why?! Unexpected error.</span>
<span class="pl-k">class</span> <span class="pl-smi">MyModel</span> <span class="pl-k">extends</span> <span class="pl-smi">Model</span> <span class="pl-kos">{</span>
    <span class="pl-c1">defaults</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
        <span class="pl-c1">title</span>: <span class="pl-s">"untitled"</span>
    <span class="pl-kos">}</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-c">// It works when assigned in the constructor</span>
<span class="pl-k">class</span> <span class="pl-smi">MyModel1</span> <span class="pl-k">extends</span> <span class="pl-smi">Model</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-c">// OK</span>
        <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">defaults</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
            <span class="pl-c1">title</span>: <span class="pl-s">"untitled"</span>
        <span class="pl-kos">}</span>       
        <span class="pl-smi">super</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>

<span class="pl-c">// Trying different way</span>
<span class="pl-k">declare</span> <span class="pl-k">class</span> <span class="pl-smi">Model2</span> <span class="pl-kos">{</span>
    <span class="pl-c">// 'defaults' is method</span>
    <span class="pl-c1">defaults</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">ObjectHash</span>
<span class="pl-kos">}</span>

<span class="pl-c">// Same here. Why is this an error? Is this a bug?</span>
<span class="pl-k">class</span> <span class="pl-smi">MyModel2</span> <span class="pl-k">extends</span> <span class="pl-smi">Model2</span> <span class="pl-kos">{</span>
    <span class="pl-en">defaults</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-kos">{</span>
            <span class="pl-c1">title</span>: <span class="pl-s">"untitled"</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>