How to correctly write this in Typescript?
var obj = {
kv: {
foo: 'bar',
bar: 'baz'
}
};
for(const k in obj.kv) {
const v = obj.kv[k];
obj.kv[k] = 'prefix' + v;
// error TS7017: Index signature of object type implicitly has an 'any' type.
}
// desired output:
// { kv: { foo: 'prefixbar', bar: 'prefixbaz' } }
I want to update each item on the obj.kv object.