title: How do I create an interface that takes a symbol index in typescript?
body: <p>I want to create an interface for an object that returns subobjects with string indices, and a string name with a symbol interface. I tried the following:</p>
  
  <pre><code>const $name = Symbol.for('name')
  
  interface Foo {
    [key: string] : Foo
    [name: $name] : string
  }
  </code></pre>
  
  <p>However, I get the error: <code>An index signature must be a string or a number</code>. But ... its not true that indexes must be strings or numbers, at least for modern javascript versions? How can I declare my object or work around this problem?</p>