mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 11:24:29 -05:00
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.
This commit is contained in:
4
src/executeCommandLine/_namespaces/ts.ts
Normal file
4
src/executeCommandLine/_namespaces/ts.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
/* Generated file to emulate the ts namespace. */
|
||||
|
||||
export * from "../../compiler/_namespaces/ts";
|
||||
export * from "../executeCommandLine";
|
||||
@@ -1,4 +1,5 @@
|
||||
namespace ts {
|
||||
import * as ts from "./_namespaces/ts";
|
||||
|
||||
interface Statistic {
|
||||
name: string;
|
||||
value: number;
|
||||
@@ -1207,4 +1208,3 @@ function writeConfigFile(
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "../tsconfig-base",
|
||||
"compilerOptions": {
|
||||
"outFile": "../../built/local/executeCommandLine.js"
|
||||
"outDir": "../../built/local"
|
||||
},
|
||||
|
||||
"references": [
|
||||
@@ -9,6 +9,7 @@
|
||||
],
|
||||
|
||||
"files": [
|
||||
"executeCommandLine.ts"
|
||||
"executeCommandLine.ts",
|
||||
"_namespaces/ts.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outFile": "../../built/local/executeCommandLine.release.js",
|
||||
"outDir": "../../built/local/release",
|
||||
"removeComments": true,
|
||||
"preserveConstEnums": false
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user