Получаем ошибку:
Element implicitly has an 'any' type because expression of type
'string' can't be used to index type 'RootActionTypesListType'.
No index signature with a parameter of type 'string'
was found on type 'RootActionTypesListType'. TS7053
11 |
12 | for (const key of Object.keys(RootActionTypes)) {
> 13 | RootActionTypes[key] = 'ROOT_' + key;
| ^
14 | }
15 | RootActionTypes = Object.freeze(RootActionTypes);
16 |
Для кода вида: