title: Typescript object: How do I restrict the keys to specific strings?
body: <p>I want to create an object of type <code>Partial</code>, where the keys will be some combination of 'a', 'b', or 'c'. It will not have all 3 keys (edit: but it will at least have one). How do I enforce this in Typescript? Here's more details:</p>
  
  <pre><code>// I have this:
  type Keys = 'a' | 'b' | 'c'
  
  // What i want to compile:
  let partial: Partial = {'a': true}
  let anotherPartial: Partial = {'b': true, 'c': false}
  
  // This requires every key:
  type Partial = {
    [key in Keys]: boolean;
  }
  
  // This throws Typescript errors, says keys must be strings:
  interface Partial = {
    [key: Keys]: boolean;
  }
  </code></pre>
  
  <p>The two methods I've tried above (using mapped types and interfaces) don't achieve what I want. Can anyone help here?</p>