mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
An __esm initializer becomes a run-once closure over its body in the bundle's own scope. Interop bindings it assigns once from require() become that require at the assignment, with their member reads respelled as reads of the required module; a namespace read only through members becomes an object literal of getters over the module's live bindings. Asynchronous initializers, initializer results, and namespaces kept as values (a memoized lazy loader) stay refused with a message naming them. The default selection now also compiles a package typed by a DefinitelyTyped twin that describes its installed release (same major, or major.minor below 1.0), and untyped dependencies of compiled packages. A twin for another release is refused with both versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>