TypeScript/src/tsc/tsc.ts
Jake Bailey b6c0538826 Generated module conversion step - stripNamespaces
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.
2022-11-07 13:32:03 -08:00

25 lines
604 B
TypeScript

import * as ts from "./_namespaces/ts";
// This file actually uses arguments passed on commandline and executes it
// enable deprecation logging
ts.Debug.loggingHost = {
log(_level, s) {
ts.sys.write(`${s || ""}${ts.sys.newLine}`);
}
};
if (ts.Debug.isDebugging) {
ts.Debug.enableDebugInfo();
}
if (ts.sys.tryEnableSourceMapsForHost && /^development$/i.test(ts.sys.getEnvironmentVariable("NODE_ENV"))) {
ts.sys.tryEnableSourceMapsForHost();
}
if (ts.sys.setBlocking) {
ts.sys.setBlocking();
}
ts.executeCommandLine(ts.sys, ts.noop, ts.sys.args);