<p dir="auto">Hi,</p>
<p dir="auto"><strong>TS</strong>: 1.4</p>
<p dir="auto">Not sure that I agree we should have an error here:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface Indexer {
        [x: string]: number
}

class Base {

 foo() : Indexer {
    return undefined;
 }
}

/*Error: Class 'Foo' incorrectly extends base class 'Base'.
 Types of property 'foo' are incompatible.
 Type '() =&gt; { id: number; }' is not assignable to type '() =&gt; Indexer'.
 Type '{ id: number; }' is not assignable to type 'Indexer'.
 Index signature is missing in type '{ id: number; }'.
*/  
class Foo extends Base {

 foo() {
    return { id: 10 };
 }
}"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-smi">Indexer</span> <span class="pl-kos">{</span>
        <span class="pl-kos">[</span><span class="pl-s1">x</span>: <span class="pl-smi">string</span><span class="pl-kos">]</span>: <span class="pl-smi">number</span>
<span class="pl-kos">}</span>

<span class="pl-k">class</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span>

 <span class="pl-en">foo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> : <span class="pl-smi">Indexer</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-c1">undefined</span><span class="pl-kos">;</span>
 <span class="pl-kos">}</span>
<span class="pl-kos">}</span>

<span class="pl-c">/*Error: Class 'Foo' incorrectly extends base class 'Base'.</span>
<span class="pl-c"> Types of property 'foo' are incompatible.</span>
<span class="pl-c"> Type '() =&gt; { id: number; }' is not assignable to type '() =&gt; Indexer'.</span>
<span class="pl-c"> Type '{ id: number; }' is not assignable to type 'Indexer'.</span>
<span class="pl-c"> Index signature is missing in type '{ id: number; }'.</span>
<span class="pl-c">*/</span>  
<span class="pl-k">class</span> <span class="pl-smi">Foo</span> <span class="pl-k">extends</span> <span class="pl-smi">Base</span> <span class="pl-kos">{</span>

 <span class="pl-en">foo</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">id</span>: <span class="pl-c1">10</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 is my code</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    export enum SortDir
    {
        Asc,
        Desc,
        Flip
    }

    export interface ISortInfo
    {
        getvalue(x: QuerySummary): any; //change to number|string in TypeScript 1.4
        order: SortDir;
        ordercalc?: number;
    }

    class SortByQueryId implements ISortInfo
    {
        getvalue = x =&gt; x.QueryId;
        order = SortDir.Flip;
    }"><pre class="notranslate">    <span class="pl-k">export</span> <span class="pl-k">enum</span> <span class="pl-smi">SortDir</span>
    <span class="pl-kos">{</span>
        <span class="pl-c1">Asc</span><span class="pl-kos">,</span>
        <span class="pl-c1">Desc</span><span class="pl-kos">,</span>
        <span class="pl-c1">Flip</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">ISortInfo</span>
    <span class="pl-kos">{</span>
        <span class="pl-c1">getvalue</span><span class="pl-kos">(</span><span class="pl-s1">x</span>: <span class="pl-smi">QuerySummary</span><span class="pl-kos">)</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-c">//change to number|string in TypeScript 1.4</span>
        <span class="pl-c1">order</span>: <span class="pl-smi">SortDir</span><span class="pl-kos">;</span>
        <span class="pl-c1">ordercalc</span>?: <span class="pl-smi">number</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">class</span> <span class="pl-smi">SortByQueryId</span> <span class="pl-k">implements</span> <span class="pl-smi">ISortInfo</span>
    <span class="pl-kos">{</span>
        <span class="pl-c1">getvalue</span> <span class="pl-c1">=</span> <span class="pl-s1">x</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">x</span><span class="pl-kos">.</span><span class="pl-c1">QueryId</span><span class="pl-kos">;</span>
        <span class="pl-c1">order</span> <span class="pl-c1">=</span> <span class="pl-smi">SortDir</span><span class="pl-kos">.</span><span class="pl-c1">Flip</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span></pre></div>
<p dir="auto">when I type "x." I expect to see the properties of QuerySummary but I do not. VS still thinks the type is 'any'</p>