title: Does TypeScript Interface have anonymous and named function?
body: <p>I think Interface rarely have both anonymous and named function. Is this right?  </p>
  
  <p>TypeScript compiler allows interface to have both anonymous and named function.</p>
  
  <pre><code>// no error
  interface Foo {
    (x: number, y: number): number; // anonymous
    namedMethod: (z: string, w: string) =&gt; string; // named
  }
  </code></pre>
  
  <p>But it seems unavailable.</p>
  
  <pre><code>// badProp is not assignable
  const foo1 : Foo = {
    badProp(x: number, y: number) { return 1 },
    namedMethod(a: string, b: string) { return 'str'; }
  }
  
  // syntax error
  const foo2 : Foo = {
    (x: number, y: number) { return 1 },
    namedMethod(a: string, b: string) { return 'str'; }
  }
  </code></pre>
  
  <p>using <code>any</code> type, it works.</p>
  
  <pre><code>const temp: any = function (x: number, y: number) { return 1 };
  temp.namedMethod = function (a: string, b: string) { return 'str'; }
  const foo3: Foo = temp;
  </code></pre>
  
  <p>Though using both is Technically possible, Interface rarely have both anonymous and named function.
  Is this right?</p>