mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-24 06:14:01 +08:00
Assertion failures throw an assert.AssertionError with Node 24.22's generatedMessage, code, actual, expected, operator and diff properties, in Node's key order. new AssertionError(options) validates its options and builds Node's message from operator, actual and expected. AssertionError type annotations, instanceof and assert.throws(fn, AssertionError) compile. Failure paths record actual, expected and operator before they throw; passing assertions do no extra work. The deep forms lower through a per-type function that returns the verdict, so the operands stay call temporaries. assert.equal and notEqual inspect their operands only when they fail. Values without a checked-dynamic form, and values whose type can be cyclic, record undefined.