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:
const $name = Symbol.for('name')
interface Foo {
[key: string] : Foo
[name: $name] : string
}
However, I get the error: An index signature must be a string or a number. 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?