Working Around Index Access Restrictions
function update<K extends keyof Person>(key: K) {
person[key] = anotherPerson[key]; // works
}
update("age");
function update<K extends keyof Person>(key: K) {
person[key] = anotherPerson[key]; // works
}
update("age");