API types often differ from the records you store. A booking update can change a note, but it should not change the booking identifier. A public account card should omit its private token. Utility types express these boundaries without maintaining another copy of every field.
The type system and the runtime still have different jobs. Omit describes a value; it doesn't delete a property from an object. You must build the public result yourself. Readonly prevents assignments through that reference, while an immutable update creates a separate record. In these tasks you will check both sides: which edits callers may describe and which data your function returns. Pay attention to zero and empty strings when applying defaults.
type Booking = {id:string;note:string;seats:number};
type BookingPatch = Partial<Pick<Booking,"note"|"seats">>;
function patchBooking(row: Booking, patch: BookingPatch): Booking { return {...row,...patch,id:row.id}; }
function solve(value: string): string { const x = JSON.parse(value) as {row:Booking;patch:BookingPatch}; return JSON.stringify(patchBooking(x.row,x.patch)); }
A complete implementation for the first scenario; trace its input before editing.