title: How to force key types in TypeScript interface?
body: <p>I want to make an object interface which force to use string as keys, but TypeScript compiler pass codes even if it had a number type as a key. Why?</p>
  
  <p>For example,</p>
  
  <pre><code>interface PriceI {
      [key:string]:number;
  }
  
  var coursePrice: PriceI = {};
  coursePrice["Orange"] = 100;
  coursePrice["Apple"] = 200;
  coursePrice[3]=200;    // It should be compile error, but it pass
  coursePrice[true]=300; // It's compile error
  </code></pre>