I have this code:
type Foo = {
fiz: 'baz',
bar: 'biz'
}
const foo: Partial<Foo> = {}
Essentially, the type will change a lot, and I want to do smth like this:
Object.keys(Foo).map(key=>{
foo[key] = null;
})
But that’s obviously impossible. Is there a way to make it work dynamically? Or am I stuck with typing each key dynamically?