I'm trying to simply index into a dictionary using typescript, here is a naive example that fails on lines 9 and 10. I get the errors Element implicitly has an 'any' type because type object has no index signature. and Element implicitly has an 'any' type because type {} has no index signature.
1 var configs = { 2 'stuff': { 3 'stuff1': 12, 4 'stuff2': 13, 5 } 6 }; 7 var locked = new Object(); 8 for (var config in configs) { 9 configs[config]['stuff1'] += 1; 10 locked[config] = true; 11 } Other SO answers offer advice like making locked and configs into a custom Dict type (type Dict = { [key: string]: object };). This also did not work and provided the same error.