mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
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.
25 lines
604 B
TypeScript
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);
|