Legacy versions of modeled context card objects were class instances with getter and setter (the old InventoryCard class) methods, which could not cleanly be destructured and failed TS compilation if we tried. Recently those get/set methods were refactored away, and this PR restores creating new objects using commonplace means of destructuring rather than using fancy (and buggy?) Object.assign tricks.
Summary
Legacy versions of modeled context card objects were class instances with getter and setter (the old
InventoryCard
class) methods, which could not cleanly be destructured and failed TS compilation if we tried. Recently thoseget
/set
methods were refactored away, and this PR restores creating new objects using commonplace means of destructuring rather than using fancy (and buggy?)Object.assign
tricks.