Open
Description
The module transform turned all of our top-level namespaces into modules.
However, some notable exceptions are ts.Debug
and the parser (and some other minor examples; search for ^namespace
).
Debug
is used nearly everywhere in the code, but calls to the namespace cannot be scope lifted by esbuild. Converting debug.ts
into something reexported like export * as Debug from "./debug.ts"
would work the same, but all calls would get lifted and become direct, which may have a performance win like the rest of the scope lifting did.
The parser has fewer calls across the namespace barrier, however it contains some duplicated allocators and this may aid in converting the parser into a self-contained tree-shakable entity for #34617.