Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jakebailey opened this issue Nov 8, 2022 · 0 comments
Open

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

jakebailey opened this issue Nov 8, 2022 · 0 comments
Assignees
Labels
Infrastructure Issue relates to TypeScript team infrastructure

Comments

@jakebailey
Copy link
Member

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.

@jakebailey jakebailey self-assigned this Nov 8, 2022
@DanielRosenwasser DanielRosenwasser added the Infrastructure Issue relates to TypeScript team infrastructure label Nov 8, 2022
@jakebailey jakebailey changed the title Convert ts.Debug, Parser, etc from namespaces into a modules Convert ts.Debug, Parser, etc from namespaces into modules Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issue relates to TypeScript team infrastructure
Projects
None yet
Development

No branches or pull requests

2 participants