title: Typescript interface generic property names
body: <p>Say we have two variables</p>
  
  <p><code>const x='property1'
  const y='property2'
  </code></p>
  
  <p>and we have function </p>
  
  <pre><code>function foo&lt;key extends keyof MapInterface&gt;(name: key, props: (MapInterface[key]))
  </code></pre>
  
  <p>This interface should look like</p>
  
  <pre><code>interface MapInterface{
  'property1':any;
  'property2':any;
  }
  </code></pre>
  
  <p>Is it possible to have the interface be generically created like by calling the variables x,y</p>
  
  <pre><code>interface MapInterface{
  x:any; //return 'property1':any;
  y:any; //return 'property2':any;
  }
  </code></pre>