| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This step makes further commits look clearer by unindenting all of the top level namespaces preemptively.
This step makes all implicit namespace accesses explicit, e.g. "Node" turns into "ts.Node".
This step converts each file into an exported module by hoisting the namespace bodies into the global scope and transferring internal markers down onto declarations as needed. The namespaces are reconstructed as "barrel"-style modules, which are identical to the old namespace objects in structure. These reconstructed namespaces are then imported in the newly module-ified files, making existing expressions like "ts." valid.
This step converts as many explicit accesses as possible in favor of direct imports from the modules in which things were declared. This restores the code (as much as possible) back to how it looked originally before the explicitify step, e.g. instead of "ts.Node" and "ts.Symbol", we have just "Node" and "Symbol".
While GitHub automatically uses this file if present, GitLens in VS Code does not. Add the right option to our example settings.json for those who use the extension. Unfortunately, you can't leave this enabled if you want to look at the repo _without_ the file; git blame just crashes when the file isn't present. I'm not sure that there's a workaround for that.
Now that we are modules, there's no reason to ban multiple namespaces per file; each file is its own scope and declaring a namespace won't merge it into any other files.
See the next commit for a more fleshed-out description.
| Back | FazBrowse Home | New Git URL |
See the next commit for a more fleshed-out description.
Please do not comment on this PR. Depending on how this set of PRs evolves, this PR's contents may change entirely based on the order of commits.
This PR is a part of a stack: