mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-14 04:15:51 +08:00
String.fromCharCode, String.fromCodePoint, the global isNaN and isFinite, DataView offsets and values, and typed-array slice/subarray bounds took a `number | undefined` value (an out-of-range read the checker types as number) through a checked narrow, which threw "undefined is not representable" or refused to compile. Node converts undefined with ToNumber: code unit 0, a RangeError for fromCodePoint, isNaN true, offset 0; an undefined slice end is the length. The Math argument conversion becomes a shared helper that also handles field reads and any other value lowered as a number-or-undefined union.