mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
A partial record assertion's literal now keeps the asserted type's optional fields it omits, in their absent state, as an ordinary record of that type does: a read yields undefined, in answers false and a write adds the property, with no guard. Only an omitted required field is missing from the view, and only its writes are guarded, so a write to an absent optional field of an ordinary record of the same type no longer throws. The receiver of a guarded write is saved whenever its value is, so a right side that reassigns the receiver's variable no longer redirects the check and the store.