mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
A value thrown from `unknown` storage (`throw values[i]`) that holds a number, string or boolean now throws as that primitive, like a statically typed `throw 5`. Before, it threw as a checked-dynamic reference, so `typeof e === "number"` (and "string"/"boolean") on the catch binding answered false and the narrowed reads were unreachable. A primitive has no identity to keep, and reading the binding as `unknown` converts it back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>