Closed
Description
We can do this:
memberName: { [index: number]: string };
And then use enums as index signature parameters, since they are some kind of numbers:
this.memberName[EnumType.EnumMember] = "";
But the language does not allow defining the index signature parameters to be an enum type, like this:
memberName: { [index: EnumType]: string };
Which can be used the same way, and the compiler can check that the references are all using the EnumType, not an arbitrary number.