mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-02 07:43:42 +08:00
The capture into an index-signature record consults a record's kept source
view only when some checked conversion in the program can keep one. That
scan accepted a closed record target and looked through union arms,
promises and arrays, but stopped at an index-signature record or a record
whose fields hold closed records. A conversion into
`Record<string, { x: string }>` keeps each value's undeclared keys, so a
program whose only such conversion had that shape dropped them in the
capture. The scan now looks through record fields and index-signature
values too, memoizing records by shape as it does unions.