Skip to content

Convert ts.Debug, Parser, etc from namespaces into modules #51441

Open
@jakebailey

Description

@jakebailey

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.

Metadata

Metadata

Assignees

Labels

InfrastructureIssue relates to TypeScript team infrastructure

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions