Before Typescript 2 version I used to convert enums to string in the following way:
public myFunction(myEnum: MyEnum): string {
return MyEnum[myEnum];
}
Now with the new version of Typescript the following error is generated: An index expression argument must be of type 'string', 'number', 'symbol' or 'any'.
Do you have an idea how I could fix this?