type MyPartial<T> = { [P in keyof T]?: T[P] }
‘in‘ like a loop.
Usage:
function updatePerson(person: Person, prop: MyPartial<Person>) { return {...person, ...prop} }
or built-in:
function updatePerson(person: Person, prop: Partial<Person>) { return {...person, ...prop} }