title: Typescript Interface, enforce the type of extra properties
body: <p>Let's say I want to create an interface to describe this type of objects:</p>
  
  <pre><code>let myObj= {
      "count": 3,
      "key1": "foo",
      "key2": "bar",
      "key3": "baz"
  };
  </code></pre>
  
  <p>Those object always have a property count of type number and the rest of the properties are strings</p>
  
  <p>If I define my interface using index signatures like this:</p>
  
  <pre><code>interface MyObect {
      count: number;
      [key: string]: string;
  }
  </code></pre>
  
  <p>I got the compiler error:</p>
  
  <pre><code>[ts] Property 'count' of type 'number' is not assignable to string index type 'string'.
  </code></pre>
  
  <p>So I have to define it like this:</p>
  
  <pre><code>interface MyObect {
      count: number;
      [key: string]: any;
  }
  </code></pre>
  
  <p>But this definition is not as presise. </p>
  
  <p>Is there a way to enforce the type of extra properties ?</p>