mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-11 02:03:59 +08:00
Records read out of a typed Map through an `IterableIterator<T>` method
(`all() { return this.rows.values(); }`) or out of a `Generator<T>` came
back through checked conversions, so the key-order witness treated their
type as built at run time and a self copy (`{ ...current, ...patch }`)
fell back to the declared order.
- A record yield channel keeps its type beside the defaulted `any` return
channel, like number, boolean and string already do: for-of and spread
read the yielded record unchecked.
- `m.values()`/`keys()`/`entries()` on a typed Map or Set flowing into an
iterator-typed slot walks the collection with typed reads. It keeps the
native iterator's protocol: lazy, live, and parked instead of closed by
an early loop exit.
- The witness counts a generator resume as building only its
IteratorResult record, not the value it carries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>