mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
Stage L1 of the localized-failure design. A local, loop variable or module global whose declared TypeScript type has no static lowering used to reject its declaration statement, and every later use of the binding failed with it. Where that failure is about to enter the build (the statement's poison in a TypeScript file, or the module global's registration), the failing type now joins the lowerer's degraded types and the unit lowers again: the type maps to the checked dynamic wherever its strict mapping fails, so the slot holds values by reference (typed capsules, live records and arrays, function thunks) and typed reads out of it are checked. Each such slot is an SC6104 performance warning, listed under coverage's statement counts and in the JSON envelope; coverage --fail-on=dynamic-slots fails on them, and --tier=static-only keeps today's refusals. A program that compiles today reaches neither commit point, so nothing degrades and its output is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>