mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
A keyed or dot read of an index signature that misses now answers undefined, as in Node, instead of aborting with "record has no key". The read carries an explicit optional value through the same analysis that already widens bindings, parameters, returns and fields for missing array elements; TypeScript's static types are unchanged. Numeric reads whose consumers treat undefined like NaN lower to plain doubles, and nested reads and writes through a missing entry throw Node's TypeError. Fixes #964 Co-authored-by: Quim T. <26749475+espetro@users.noreply.github.com>