Typescript interface type with optional keys of different types and strictNullChecks
<p>I am trying to create the following interface in typescript:</p>

<pre><code>type MoveSpeed = "min" | "road" | "full";

interface Interval {
  min?: number,
  max?: number
}

interface CreepPlan {
  [partName: string] : Interval;
  move?:    MoveSpeed;
}
</code></pre>

<p>However, this syntax is invalid. The compiler says <code>Property 'move' of type '"min" | "road" | "full" | undefined' is not assignable to string index type 'Interval'.</code>.</p>

<p>I am using the compiler option <code>strictNullChecks:true</code>, which is why <code>undefined</code> is included implicitly for the <code>move?</code> key.</p>

<p>However, this syntax is valid:</p>

<pre><code>type MoveSpeed = "min" | "road" | "full";

interface Interval {
  min?: number,
  max?: number
}

interface CreepPlan {
  [partName: string] : Interval;
  move:    MoveSpeed;            // 'move' is required
}
</code></pre>

<p>I want to express the idea "CreepPlan consists of string:Interval pairs, except the optional 'move' key which is a string:MoveSpeed pair." Is it possible to express this in typescript?</p>