title: "Consider using a mapped object type instead." - what's a mapped object type and how do I use it here?
body: <p>When I try to compile this Typescript code</p>
  <pre><code>interface Foo { 
      [foo: &quot;hello&quot; | &quot;world&quot;]: string;
  }
  </code></pre>
  <p>I get this error message</p>
  <p><code>An index signature parameter type cannot be a union type. Consider using a mapped object type instead.</code></p>
  <p>What is a mapped object type, and how do I use it?</p>