Files
scriptc/tests
Malte UblandClaude Opus 5.5 29909ed1aa Give tsc's void-init export preamble no storage for class exports
tsc opens every CommonJS file with `exports.A = exports.B = void 0;` and
later aliases `exports.A = A;`. Collection registered an export global
for the chain's first name at the preamble, while the preamble lowered
to nothing and the class alias registered and stored nothing. Importers
then read `lib.A` from a global that was never assigned, and `new
lib.A()` crashed with a segfault (chardet's encoding modules).

The preamble detection moves to program.ts so collection and lowering
share it. A dropped preamble whose real assignment is a class alias now
registers no storage, so importers resolve to the class.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 15:04:56 -07:00
..
…
2026-10-18 12:01:19 -05:00