TS copy with `with` syntax

what is the closest to with syntax like this
let originalPerson = { Name = "Alice"; Age = 30 }
let updatedPerson = { originalPerson with Age = 31 }
let originalPerson = { Name = "Alice"; Age = 30 }
let updatedPerson = { originalPerson with Age = 31 }
in TypeScript to update objects
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?