title: How to create a TypeScript interface with both an index signature and a fixed property of a different type?
body: <p>From a legacy api I am getting a JSON response like so:</p>
  
  <pre><code>const someObject = {
      "general": {
          "2000": 50,
          "4000": 100,
          "8000": 200,
      },
      "foo": [
          0,
          1,
          2,
      ],
      "bar": [
          5,
          7,
      ],
      "baz": [
          8,
          9,
      ],
  };
  </code></pre>
  
  <p>Keep in mind that all the indexes except "general" are dynamic and might not be in the response, I cannot type for each property but have to use an index signature.</p>
  
  <p>I wanted to achieve that via typescript@2.9.2:</p>
  
  <pre><code>interface ISomeObject {
      general: {
          [index: string]: number;
      };
  
      [index: string]?: number[];
  }
  </code></pre>
  
  <p>as <code>general</code> will always be in the response, yet the other indexes might or might not be in there.</p>
  
  <p>Issue that I am facing:</p>
  
  <ul>
  <li>I cannot make the <code>[index: string]?: number[]</code> optional as it will complain that number is used as a value here.</li>
  <li><p><code>[index: string]: number[]</code> will override the definition of <code>general: number</code> and hence tsc will complain: </p>
  
  <pre><code>Property 'general' of type '{ [index: string]: number; }' is not assignable to string index type 'number[]'.`
  </code></pre></li>
  </ul>
  
  <p>Can I even type for this format with a TypeScript interface?</p>