mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
`export default { parse, stringify, DateType, ParseError }` failed at
module initialization: the literal's width check against the default
binding's type found class members missing.
- A class name in a shorthand property (`{ ParseError }`) now evaluates
to the class object, exactly like the long form `{ ParseError:
ParseError }`; it had no lowering, so the JavaScript literal dropped
the member.
- A class the program could not lower (one extending Date) is still
dropped from the literal, its diagnostic deferred to the reads that
reach it. The default binding of a JavaScript object literal now
registers its type without such members, so the module initializes
and the named exports work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>