From 77b60e6c7b4987baf6404cb71ca7c7caf4390002 Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 27 Oct 2025 19:33:50 -0700
Subject: [PATCH 1/4] Fix shouldEmitImportEqualsDeclaration
---
.../tstransforms/importelision.go | 8 +-
.../reference/submodule/compiler/aliasBug.js | 1 +
.../submodule/compiler/aliasBug.js.diff | 5 +-
.../submodule/compiler/aliasErrors.js | 2 +
.../submodule/compiler/aliasErrors.js.diff | 7 +-
.../submodule/compiler/chainedImportAlias.js | 1 +
.../compiler/chainedImportAlias.js.diff | 8 -
...quireAndInternalModuleAliasInGlobalFile.js | 2 +
...AndInternalModuleAliasInGlobalFile.js.diff | 11 --
.../submodule/compiler/constEnums.js | 2 +
.../submodule/compiler/constEnums.js.diff | 6 +-
...constructorWithIncompleteTypeAnnotation.js | 1 +
...ructorWithIncompleteTypeAnnotation.js.diff | 9 +-
...ileExportAssignmentImportInternalModule.js | 1 +
...portAssignmentImportInternalModule.js.diff | 9 -
.../compiler/declFileForExportedImport.js | 2 +
.../declFileForExportedImport.js.diff | 13 --
.../declFileImportChainInExportAssignment.js | 2 +
...lFileImportChainInExportAssignment.js.diff | 10 --
...arationEmitEnumReferenceViaImportEquals.js | 1 +
...onEmitEnumReferenceViaImportEquals.js.diff | 6 +-
.../compiler/declarationEmitUnknownImport.js | 2 +
.../declarationEmitUnknownImport.js.diff | 11 --
.../compiler/declarationEmitUnknownImport2.js | 3 +-
.../declarationEmitUnknownImport2.js.diff | 12 --
.../submodule/compiler/declareDottedExtend.js | 1 +
.../compiler/declareDottedExtend.js.diff | 10 --
...rtNamedImportInIndirectExportAssignment.js | 1 +
...edImportInIndirectExportAssignment.js.diff | 9 -
.../compiler/es6ModuleInternalImport.js | 2 +
.../compiler/es6ModuleInternalImport.js.diff | 4 +-
.../compiler/exportDefaultProperty.js | 1 +
.../compiler/exportDefaultProperty.js.diff | 10 --
.../compiler/globalThisDeclarationEmit3.js | 2 +
.../globalThisDeclarationEmit3.js.diff | 11 --
.../compiler/importDeclWithClassModifiers.js | 4 +
.../importDeclWithClassModifiers.js.diff | 11 +-
...clWithExportModifierAndExportAssignment.js | 2 +
...hExportModifierAndExportAssignment.js.diff | 8 +-
...liasClassInsideTopLevelModuleWithExport.js | 3 +-
...lassInsideTopLevelModuleWithExport.js.diff | 18 --
...sClassInsideTopLevelModuleWithoutExport.js | 1 +
...sInsideTopLevelModuleWithoutExport.js.diff | 9 -
...nctionInsideTopLevelModuleWithoutExport.js | 1 +
...nInsideTopLevelModuleWithoutExport.js.diff | 9 -
...zedModuleInsideTopLevelModuleWithExport.js | 3 +-
...duleInsideTopLevelModuleWithExport.js.diff | 18 --
...iasVarInsideTopLevelModuleWithoutExport.js | 1 +
...rInsideTopLevelModuleWithoutExport.js.diff | 9 -
.../compiler/moduleVisibilityTest1.js | 1 +
.../compiler/moduleVisibilityTest1.js.diff | 10 +-
.../compiler/moduleVisibilityTest2.js | 1 +
.../compiler/moduleVisibilityTest2.js.diff | 10 +-
.../submodule/compiler/privacyImport.js | 32 +++-
.../submodule/compiler/privacyImport.js.diff | 64 +------
.../compiler/privacyImportParseErrors.js | 7 +-
.../compiler/privacyImportParseErrors.js.diff | 35 +---
.../compiler/sourceMapValidationImport.js | 4 +-
.../sourceMapValidationImport.js.diff | 19 --
.../compiler/sourceMapValidationImport.js.map | 4 +-
.../sourceMapValidationImport.js.map.diff | 4 +-
.../sourceMapValidationImport.sourcemap.txt | 86 ++++++---
...urceMapValidationImport.sourcemap.txt.diff | 163 +++++++-----------
.../compiler/typeofInternalModules.js | 1 +
.../compiler/typeofInternalModules.js.diff | 10 --
.../classAbstractImportInstantiation.js | 1 +
.../classAbstractImportInstantiation.js.diff | 8 -
.../conformance/exportsAndImports1-es6.js | 2 +
.../exportsAndImports1-es6.js.diff | 8 +-
.../conformance/exportsAndImports1.js | 2 +
.../conformance/exportsAndImports1.js.diff | 8 +-
.../conformance/exportsAndImports3-es6.js | 4 +-
.../exportsAndImports3-es6.js.diff | 13 +-
.../conformance/exportsAndImports3.js | 4 +-
.../conformance/exportsAndImports3.js.diff | 13 +-
.../submodule/conformance/importEquals3.js | 3 +
.../conformance/importEquals3.js.diff | 17 --
.../submodule/conformance/parser519458.js | 1 +
.../conformance/parser519458.js.diff | 9 -
.../reExportAliasMakesInstantiated.js | 2 +
.../reExportAliasMakesInstantiated.js.diff | 9 -
.../conformance/typeofAnExportedType.js | 3 +-
.../conformance/typeofAnExportedType.js.diff | 16 +-
83 files changed, 278 insertions(+), 579 deletions(-)
delete mode 100644 testdata/baselines/reference/submodule/compiler/chainedImportAlias.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/typeofInternalModules.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/importEquals3.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/parser519458.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js.diff
diff --git a/internal/transformers/tstransforms/importelision.go b/internal/transformers/tstransforms/importelision.go
index 81d05e0046..936d7740bb 100644
--- a/internal/transformers/tstransforms/importelision.go
+++ b/internal/transformers/tstransforms/importelision.go
@@ -124,16 +124,10 @@ func (tx *ImportElisionTransformer) shouldEmitAliasDeclaration(node *ast.Node) b
}
func (tx *ImportElisionTransformer) shouldEmitImportEqualsDeclaration(node *ast.ImportEqualsDeclaration) bool {
- if !tx.shouldEmitAliasDeclaration(node.AsNode()) {
- return false
- }
- if node.ModuleReference.Kind == ast.KindExternalModuleReference {
- return true
- }
// preserve old compiler's behavior: emit import declaration (even if we do not consider them referenced) when
// - current file is not external module
// - import declaration is top level and target is value imported by entity name
- return tx.currentSourceFile != nil && ast.IsExternalModule(tx.currentSourceFile) && tx.isTopLevelValueImportEqualsWithEntityName(node.AsNode())
+ return tx.shouldEmitAliasDeclaration(node.AsNode()) || (!ast.IsExternalModule(tx.currentSourceFile) && tx.isTopLevelValueImportEqualsWithEntityName(node.AsNode()))
}
func (tx *ImportElisionTransformer) isReferencedAliasDeclaration(node *ast.Node) bool {
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js b/testdata/baselines/reference/submodule/compiler/aliasBug.js
index 7c8e941cb5..c08f24c144 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js
@@ -37,6 +37,7 @@ var foo;
})(baz = bar.baz || (bar.baz = {}));
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
+var provide = foo;
var p = new provide.Provide();
function use() {
var p1; // error here, but should be okay
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
index 1906307412..7817503bae 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
@@ -1,10 +1,9 @@
--- old.aliasBug.js
+++ new.aliasBug.js
-@@= skipped -36, +36 lines =@@
- })(baz = bar.baz || (bar.baz = {}));
+@@= skipped -37, +37 lines =@@
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
--var provide = foo;
+ var provide = foo;
-var booz = foo.bar.baz;
var p = new provide.Provide();
function use() {
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js b/testdata/baselines/reference/submodule/compiler/aliasErrors.js
index dc63511f5a..028ff63e9e 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js
@@ -48,6 +48,8 @@ var foo;
})(baz = bar.baz || (bar.baz = {}));
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
+var provide = foo;
+var beez = foo.bar;
5;
"s";
null;
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
index 24b597fbc2..474c41c08b 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
@@ -1,12 +1,11 @@
--- old.aliasErrors.js
+++ new.aliasErrors.js
-@@= skipped -47, +47 lines =@@
- })(baz = bar.baz || (bar.baz = {}));
+@@= skipped -48, +48 lines =@@
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
--var provide = foo;
+ var provide = foo;
-var booz = foo.bar.baz;
--var beez = foo.bar;
+ var beez = foo.bar;
-var m = no;
-var m2 = no.mod;
5;
diff --git a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js
index 744385e018..38e8d3ef71 100644
--- a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js
+++ b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js
@@ -24,4 +24,5 @@ var m;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const x = require("./chainedImportAlias_file0");
+var y = x;
y.m.foo();
diff --git a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js.diff b/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js.diff
deleted file mode 100644
index aeaadd6c45..0000000000
--- a/testdata/baselines/reference/submodule/compiler/chainedImportAlias.js.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.chainedImportAlias.js
-+++ new.chainedImportAlias.js
-@@= skipped -23, +23 lines =@@
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- const x = require("./chainedImportAlias_file0");
--var y = x;
- y.m.foo();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js
index f3c31830a6..b17ca68e2d 100644
--- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js
+++ b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js
@@ -31,6 +31,8 @@ var mOfGloalFile;
}
mOfGloalFile.c = c;
})(mOfGloalFile || (mOfGloalFile = {}));
+var exports = mOfGloalFile.c;
+var require = mOfGloalFile.c;
new exports();
new require();
var m1;
diff --git a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff b/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff
deleted file mode 100644
index 20192ebec8..0000000000
--- a/testdata/baselines/reference/submodule/compiler/collisionExportsRequireAndInternalModuleAliasInGlobalFile.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.collisionExportsRequireAndInternalModuleAliasInGlobalFile.js
-+++ new.collisionExportsRequireAndInternalModuleAliasInGlobalFile.js
-@@= skipped -30, +30 lines =@@
- }
- mOfGloalFile.c = c;
- })(mOfGloalFile || (mOfGloalFile = {}));
--var exports = mOfGloalFile.c;
--var require = mOfGloalFile.c;
- new exports();
- new require();
- var m1;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.js b/testdata/baselines/reference/submodule/compiler/constEnums.js
index 997e58ea41..8d10e3cead 100644
--- a/testdata/baselines/reference/submodule/compiler/constEnums.js
+++ b/testdata/baselines/reference/submodule/compiler/constEnums.js
@@ -192,6 +192,8 @@ var A2;
})(C = B.C || (B.C = {}));
})(B = A2.B || (A2.B = {}));
})(A2 || (A2 = {}));
+var I1 = A1.B;
+var I2 = A2.B;
function foo0(e) {
if (e === 1 /* I.V1 */) {
}
diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.js.diff b/testdata/baselines/reference/submodule/compiler/constEnums.js.diff
index 4e58af014f..9b426c0601 100644
--- a/testdata/baselines/reference/submodule/compiler/constEnums.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/constEnums.js.diff
@@ -4,7 +4,7 @@
})(C = B.C || (B.C = {}));
})(B = A2.B || (A2.B = {}));
})(A2 || (A2 = {}));
--var I2 = A2.B;
++var I1 = A1.B;
+ var I2 = A2.B;
function foo0(e) {
- if (e === 1 /* I.V1 */) {
- }
\ No newline at end of file
+ if (e === 1 /* I.V1 */) {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js
index 6e7de480a0..c4501ecf06 100644
--- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js
+++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js
@@ -282,6 +282,7 @@ TypeScriptAllInOne.Program.Main();
//// [constructorWithIncompleteTypeAnnotation.js]
+var fs = module;
("fs");
var TypeScriptAllInOne;
(function (TypeScriptAllInOne) {
diff --git a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff
index 4237e5af02..4cebc1b864 100644
--- a/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/constructorWithIncompleteTypeAnnotation.js.diff
@@ -1,11 +1,6 @@
--- old.constructorWithIncompleteTypeAnnotation.js
+++ new.constructorWithIncompleteTypeAnnotation.js
-@@= skipped -281, +281 lines =@@
-
-
- //// [constructorWithIncompleteTypeAnnotation.js]
--var fs = module;
- ("fs");
+@@= skipped -286, +286 lines =@@
var TypeScriptAllInOne;
(function (TypeScriptAllInOne) {
class Program {
@@ -15,7 +10,7 @@
static Main(...args) {
try {
var bfs = new BasicFeatures();
-@@= skipped -15, +11 lines =@@
+@@= skipped -10, +7 lines =@@
retValue = bfs.VARIABLES();
if (retValue != 0)
^= {
diff --git a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js
index 59c0faa816..10633bbae1 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js
@@ -28,6 +28,7 @@ export = m;
var m3;
(function (m3) {
})(m3 || (m3 = {}));
+var m = m3;
module.exports = m;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js.diff b/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js.diff
deleted file mode 100644
index f80e637d8d..0000000000
--- a/testdata/baselines/reference/submodule/compiler/declFileExportAssignmentImportInternalModule.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.declFileExportAssignmentImportInternalModule.js
-+++ new.declFileExportAssignmentImportInternalModule.js
-@@= skipped -27, +27 lines =@@
- var m3;
- (function (m3) {
- })(m3 || (m3 = {}));
--var m = m3;
- module.exports = m;
-
diff --git a/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js b/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js
index 782e7f0b73..e1c25c7eac 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js
@@ -18,9 +18,11 @@ exports.x = void 0;
//// [declFileForExportedImport_1.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.b = void 0;
///
exports.a = require("./declFileForExportedImport_0");
var y = exports.a.x;
+exports.b = exports.a;
var z = exports.b.x;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js.diff b/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js.diff
deleted file mode 100644
index 6f22734a59..0000000000
--- a/testdata/baselines/reference/submodule/compiler/declFileForExportedImport.js.diff
+++ /dev/null
@@ -1,13 +0,0 @@
---- old.declFileForExportedImport.js
-+++ new.declFileForExportedImport.js
-@@= skipped -17, +17 lines =@@
- //// [declFileForExportedImport_1.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.b = void 0;
- ///
- exports.a = require("./declFileForExportedImport_0");
- var y = exports.a.x;
--exports.b = exports.a;
- var z = exports.b.x;
-
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js
index e49bcf83fd..e497fe9f52 100644
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js
+++ b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js
@@ -22,6 +22,8 @@ var m;
c_1.c = c;
})(c = m.c || (m.c = {}));
})(m || (m = {}));
+var a = m.c;
+var b = a;
module.exports = b;
diff --git a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff
deleted file mode 100644
index 4a8556727c..0000000000
--- a/testdata/baselines/reference/submodule/compiler/declFileImportChainInExportAssignment.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.declFileImportChainInExportAssignment.js
-+++ new.declFileImportChainInExportAssignment.js
-@@= skipped -21, +21 lines =@@
- c_1.c = c;
- })(c = m.c || (m.c = {}));
- })(m || (m = {}));
--var a = m.c;
--var b = a;
- module.exports = b;
-
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js
index c52d37e970..33c93fef00 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js
@@ -45,6 +45,7 @@ var Translation;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Test = void 0;
const translation_1 = require("./translation");
+var TranslationKeyEnum = translation_1.Translation.TranslationKeyEnum;
class Test {
TranslationKeyEnum = TranslationKeyEnum;
print() {
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff
index 33b3ee054f..1fe6b161b5 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitEnumReferenceViaImportEquals.js.diff
@@ -1,10 +1,8 @@
--- old.declarationEmitEnumReferenceViaImportEquals.js
+++ new.declarationEmitEnumReferenceViaImportEquals.js
-@@= skipped -44, +44 lines =@@
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.Test = void 0;
+@@= skipped -46, +46 lines =@@
const translation_1 = require("./translation");
--var TranslationKeyEnum = translation_1.Translation.TranslationKeyEnum;
+ var TranslationKeyEnum = translation_1.Translation.TranslationKeyEnum;
class Test {
- constructor() {
- this.TranslationKeyEnum = TranslationKeyEnum;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js b/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js
index f4c4d4eb1e..09d55a0d35 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js
@@ -8,6 +8,8 @@ export {Foo}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Foo = void 0;
+var Foo = SomeNonExistingName;
+exports.Foo = Foo;
//// [declarationEmitUnknownImport.d.ts]
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js.diff
deleted file mode 100644
index 1791d89fc7..0000000000
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.declarationEmitUnknownImport.js
-+++ new.declarationEmitUnknownImport.js
-@@= skipped -7, +7 lines =@@
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.Foo = void 0;
--var Foo = SomeNonExistingName;
--exports.Foo = Foo;
-
-
- //// [declarationEmitUnknownImport.d.ts]
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js b/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js
index 97a7d72854..62350a39a0 100644
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js
+++ b/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js
@@ -6,8 +6,9 @@ export default Foo
//// [declarationEmitUnknownImport2.js]
"use strict";
-'./Foo'; // Syntax error
Object.defineProperty(exports, "__esModule", { value: true });
+var Foo = From;
+'./Foo'; // Syntax error
exports.default = Foo;
diff --git a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js.diff b/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js.diff
deleted file mode 100644
index d13d1e070c..0000000000
--- a/testdata/baselines/reference/submodule/compiler/declarationEmitUnknownImport2.js.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- old.declarationEmitUnknownImport2.js
-+++ new.declarationEmitUnknownImport2.js
-@@= skipped -5, +5 lines =@@
-
- //// [declarationEmitUnknownImport2.js]
- "use strict";
--Object.defineProperty(exports, "__esModule", { value: true });
--var Foo = From;
- './Foo'; // Syntax error
-+Object.defineProperty(exports, "__esModule", { value: true });
- exports.default = Foo;
-
diff --git a/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js b/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js
index f2d8d458cb..d399f42368 100644
--- a/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js
+++ b/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js
@@ -14,6 +14,7 @@ class E extends A.B.C{ }
//// [declareDottedExtend.js]
+var ab = A.B;
class D extends ab.C {
}
class E extends A.B.C {
diff --git a/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff b/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff
deleted file mode 100644
index b21e4794d3..0000000000
--- a/testdata/baselines/reference/submodule/compiler/declareDottedExtend.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.declareDottedExtend.js
-+++ new.declareDottedExtend.js
-@@= skipped -13, +13 lines =@@
-
-
- //// [declareDottedExtend.js]
--var ab = A.B;
- class D extends ab.C {
- }
- class E extends A.B.C {
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js
index ddbd45a1dc..7805bb300a 100644
--- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js
+++ b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js
@@ -24,6 +24,7 @@ var a;
//// [es6ImportNamedImportInIndirectExportAssignment_1.js]
"use strict";
const es6ImportNamedImportInIndirectExportAssignment_0_1 = require("./es6ImportNamedImportInIndirectExportAssignment_0");
+var x = es6ImportNamedImportInIndirectExportAssignment_0_1.a;
module.exports = x;
diff --git a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff
deleted file mode 100644
index cc9619f956..0000000000
--- a/testdata/baselines/reference/submodule/compiler/es6ImportNamedImportInIndirectExportAssignment.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.es6ImportNamedImportInIndirectExportAssignment.js
-+++ new.es6ImportNamedImportInIndirectExportAssignment.js
-@@= skipped -23, +23 lines =@@
- //// [es6ImportNamedImportInIndirectExportAssignment_1.js]
- "use strict";
- const es6ImportNamedImportInIndirectExportAssignment_0_1 = require("./es6ImportNamedImportInIndirectExportAssignment_0");
--var x = es6ImportNamedImportInIndirectExportAssignment_0_1.a;
- module.exports = x;
-
diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js
index 91c06dd5b1..509b15869c 100644
--- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js
+++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js
@@ -27,6 +27,8 @@ var m;
(function (m) {
m.a = 10;
})(m || (m = {}));
+export var a1 = m.a;
+var a2 = m.a;
var x = a1 + a2;
export { m1 };
var m1;
diff --git a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js.diff b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js.diff
index 8ae4efec00..4446a42775 100644
--- a/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/es6ModuleInternalImport.js.diff
@@ -10,8 +10,8 @@
(function (m) {
m.a = 10;
})(m || (m = {}));
--export var a1 = m.a;
--var a2 = m.a;
+ export var a1 = m.a;
+ var a2 = m.a;
var x = a1 + a2;
-export var m1;
+export { m1 };
diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js
index ed36cac0c8..6b55cd96b9 100644
--- a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js
+++ b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js
@@ -65,6 +65,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
///
const foobar_1 = __importDefault(require("foobar"));
+var X = foobar_1.default.X;
const foobarx_1 = __importDefault(require("foobarx"));
const x = X;
const x2 = foobarx_1.default;
diff --git a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff b/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff
deleted file mode 100644
index 980e865d8a..0000000000
--- a/testdata/baselines/reference/submodule/compiler/exportDefaultProperty.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.exportDefaultProperty.js
-+++ new.exportDefaultProperty.js
-@@= skipped -64, +64 lines =@@
- Object.defineProperty(exports, "__esModule", { value: true });
- ///
- const foobar_1 = __importDefault(require("foobar"));
--var X = foobar_1.default.X;
- const foobarx_1 = __importDefault(require("foobarx"));
- const x = X;
- const x2 = foobarx_1.default;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js b/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js
index f0a3351f45..666bbe9efc 100644
--- a/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js
+++ b/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js
@@ -12,6 +12,8 @@ export { mod as variable };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.variable = void 0;
+var mod = globalThis;
+exports.variable = mod;
//// [index.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js.diff b/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js.diff
deleted file mode 100644
index 5c8a78e223..0000000000
--- a/testdata/baselines/reference/submodule/compiler/globalThisDeclarationEmit3.js.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- old.globalThisDeclarationEmit3.js
-+++ new.globalThisDeclarationEmit3.js
-@@= skipped -11, +11 lines =@@
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.variable = void 0;
--var mod = globalThis;
--exports.variable = mod;
- //// [index.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js
index daf66572ad..a7b29f9b7a 100644
--- a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js
+++ b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js
@@ -14,4 +14,8 @@ var b: a;
//// [importDeclWithClassModifiers.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.c = exports.b = exports.a = void 0;
+exports.a = x.c;
+b = x.c;
+exports.c = x.c;
var b;
diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff
index 9f03b5ceda..cbfcfb0d81 100644
--- a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff
@@ -1,11 +1,10 @@
--- old.importDeclWithClassModifiers.js
+++ new.importDeclWithClassModifiers.js
-@@= skipped -13, +13 lines =@@
- //// [importDeclWithClassModifiers.js]
- "use strict";
+@@= skipped -15, +15 lines =@@
Object.defineProperty(exports, "__esModule", { value: true });
--exports.c = exports.b = exports.a = void 0;
--exports.a = x.c;
+ exports.c = exports.b = exports.a = void 0;
+ exports.a = x.c;
-exports.b = x.c;
--exports.c = x.c;
++b = x.c;
+ exports.c = x.c;
var b;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js
index 8f2fc5436e..7ae4360ed9 100644
--- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js
+++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js
@@ -11,3 +11,5 @@ export = x;
//// [importDeclWithExportModifierAndExportAssignment.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.a = void 0;
+exports.a = x.c;
diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js.diff b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js.diff
index fe1afa0e17..85a72d688d 100644
--- a/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/importDeclWithExportModifierAndExportAssignment.js.diff
@@ -4,7 +4,7 @@
//// [importDeclWithExportModifierAndExportAssignment.js]
"use strict";
--exports.a = void 0;
--exports.a = x.c;
--module.exports = x;
-+Object.defineProperty(exports, "__esModule", { value: true });
\ No newline at end of file
++Object.defineProperty(exports, "__esModule", { value: true });
+ exports.a = void 0;
+ exports.a = x.c;
+-module.exports = x;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js
index a4c686d9f4..f74b0f0b8d 100644
--- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js
+++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js
@@ -16,7 +16,7 @@ var cReturnVal = cProp.foo(10);
//// [internalAliasClassInsideTopLevelModuleWithExport.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.cProp = exports.x = void 0;
+exports.cProp = exports.xc = exports.x = void 0;
var x;
(function (x) {
class c {
@@ -26,6 +26,7 @@ var x;
}
x.c = c;
})(x || (exports.x = x = {}));
+exports.xc = x.c;
exports.cProp = new exports.xc();
var cReturnVal = exports.cProp.foo(10);
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff
deleted file mode 100644
index 5bc6b0a911..0000000000
--- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithExport.js.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- old.internalAliasClassInsideTopLevelModuleWithExport.js
-+++ new.internalAliasClassInsideTopLevelModuleWithExport.js
-@@= skipped -15, +15 lines =@@
- //// [internalAliasClassInsideTopLevelModuleWithExport.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.cProp = exports.xc = exports.x = void 0;
-+exports.cProp = exports.x = void 0;
- var x;
- (function (x) {
- class c {
-@@= skipped -10, +10 lines =@@
- }
- x.c = c;
- })(x || (exports.x = x = {}));
--exports.xc = x.c;
- exports.cProp = new exports.xc();
- var cReturnVal = exports.cProp.foo(10);
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js
index a08a459766..ee6fabef1d 100644
--- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js
+++ b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js
@@ -26,6 +26,7 @@ var x;
}
x.c = c;
})(x || (exports.x = x = {}));
+var xc = x.c;
exports.cProp = new xc();
var cReturnVal = exports.cProp.foo(10);
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff
deleted file mode 100644
index 02dab15e72..0000000000
--- a/testdata/baselines/reference/submodule/compiler/internalAliasClassInsideTopLevelModuleWithoutExport.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.internalAliasClassInsideTopLevelModuleWithoutExport.js
-+++ new.internalAliasClassInsideTopLevelModuleWithoutExport.js
-@@= skipped -25, +25 lines =@@
- }
- x.c = c;
- })(x || (exports.x = x = {}));
--var xc = x.c;
- exports.cProp = new xc();
- var cReturnVal = exports.cProp.foo(10);
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js
index 6c6bd17bab..d5168fd8a8 100644
--- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js
+++ b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js
@@ -23,6 +23,7 @@ var a;
}
a.foo = foo;
})(a || (exports.a = a = {}));
+var b = a.foo;
exports.bVal = b(10);
exports.bVal2 = b;
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js.diff
deleted file mode 100644
index 25d8ceb4aa..0000000000
--- a/testdata/baselines/reference/submodule/compiler/internalAliasFunctionInsideTopLevelModuleWithoutExport.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.internalAliasFunctionInsideTopLevelModuleWithoutExport.js
-+++ new.internalAliasFunctionInsideTopLevelModuleWithoutExport.js
-@@= skipped -22, +22 lines =@@
- }
- a.foo = foo;
- })(a || (exports.a = a = {}));
--var b = a.foo;
- exports.bVal = b(10);
- exports.bVal2 = b;
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js
index 63656bc076..fd2c281e79 100644
--- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js
+++ b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js
@@ -14,7 +14,7 @@ export var x: b.c = new b.c();
//// [internalAliasInitializedModuleInsideTopLevelModuleWithExport.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.x = exports.a = void 0;
+exports.x = exports.b = exports.a = void 0;
var a;
(function (a) {
let b;
@@ -24,6 +24,7 @@ var a;
b.c = c;
})(b = a.b || (a.b = {}));
})(a || (exports.a = a = {}));
+exports.b = a.b;
exports.x = new exports.b.c();
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff
deleted file mode 100644
index bc977f9b52..0000000000
--- a/testdata/baselines/reference/submodule/compiler/internalAliasInitializedModuleInsideTopLevelModuleWithExport.js.diff
+++ /dev/null
@@ -1,18 +0,0 @@
---- old.internalAliasInitializedModuleInsideTopLevelModuleWithExport.js
-+++ new.internalAliasInitializedModuleInsideTopLevelModuleWithExport.js
-@@= skipped -13, +13 lines =@@
- //// [internalAliasInitializedModuleInsideTopLevelModuleWithExport.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.x = exports.b = exports.a = void 0;
-+exports.x = exports.a = void 0;
- var a;
- (function (a) {
- let b;
-@@= skipped -10, +10 lines =@@
- b.c = c;
- })(b = a.b || (a.b = {}));
- })(a || (exports.a = a = {}));
--exports.b = a.b;
- exports.x = new exports.b.c();
-
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js
index bf9a8626b2..3076eff77a 100644
--- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js
+++ b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js
@@ -18,6 +18,7 @@ var a;
(function (a) {
a.x = 10;
})(a || (exports.a = a = {}));
+var b = a.x;
exports.bVal = b;
diff --git a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js.diff b/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js.diff
deleted file mode 100644
index 1b083af661..0000000000
--- a/testdata/baselines/reference/submodule/compiler/internalAliasVarInsideTopLevelModuleWithoutExport.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.internalAliasVarInsideTopLevelModuleWithoutExport.js
-+++ new.internalAliasVarInsideTopLevelModuleWithoutExport.js
-@@= skipped -17, +17 lines =@@
- (function (a) {
- a.x = 10;
- })(a || (exports.a = a = {}));
--var b = a.x;
- exports.bVal = b;
-
diff --git a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js
index 8eb402bcb7..36a737cd8d 100644
--- a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js
+++ b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js
@@ -78,6 +78,7 @@ var OuterMod;
OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc;
})(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {}));
})(OuterMod || (OuterMod = {}));
+var OuterInnerAlias = OuterMod.OuterInnerMod;
var M;
(function (M) {
let InnerMod;
diff --git a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js.diff b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js.diff
index 3f3a1c7e68..1a012d9c0e 100644
--- a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest1.js.diff
@@ -1,14 +1,6 @@
--- old.moduleVisibilityTest1.js
+++ new.moduleVisibilityTest1.js
-@@= skipped -77, +77 lines =@@
- OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc;
- })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {}));
- })(OuterMod || (OuterMod = {}));
--var OuterInnerAlias = OuterMod.OuterInnerMod;
- var M;
- (function (M) {
- let InnerMod;
-@@= skipped -17, +16 lines =@@
+@@= skipped -94, +94 lines =@@
M.x = 5;
var y = M.x + M.x;
class B {
diff --git a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js
index ff2fa226a3..c869be68c8 100644
--- a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js
+++ b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js
@@ -79,6 +79,7 @@ var OuterMod;
OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc;
})(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {}));
})(OuterMod || (OuterMod = {}));
+var OuterInnerAlias = OuterMod.OuterInnerMod;
var M;
(function (M) {
let InnerMod;
diff --git a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js.diff b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js.diff
index 5f0dbf81a6..a08faf0422 100644
--- a/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/moduleVisibilityTest2.js.diff
@@ -1,14 +1,6 @@
--- old.moduleVisibilityTest2.js
+++ new.moduleVisibilityTest2.js
-@@= skipped -78, +78 lines =@@
- OuterInnerMod.someExportedOuterInnerFunc = someExportedOuterInnerFunc;
- })(OuterInnerMod = OuterMod.OuterInnerMod || (OuterMod.OuterInnerMod = {}));
- })(OuterMod || (OuterMod = {}));
--var OuterInnerAlias = OuterMod.OuterInnerMod;
- var M;
- (function (M) {
- let InnerMod;
-@@= skipped -17, +16 lines =@@
+@@= skipped -95, +95 lines =@@
var x = 5;
var y = x + x;
class B {
diff --git a/testdata/baselines/reference/submodule/compiler/privacyImport.js b/testdata/baselines/reference/submodule/compiler/privacyImport.js
index 4bd0dc15d6..040fd47557 100644
--- a/testdata/baselines/reference/submodule/compiler/privacyImport.js
+++ b/testdata/baselines/reference/submodule/compiler/privacyImport.js
@@ -361,7 +361,7 @@ export module m3 {
//// [privacyImport.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.m3 = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
+exports.m3 = exports.glo_im2_public = exports.glo_im1_public = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
var m1;
(function (m1) {
let m1_M1_public;
@@ -513,6 +513,14 @@ var glo_M3_private;
glo_M3_private.f1 = f1;
glo_M3_private.v1 = c1;
})(glo_M3_private || (exports.glo_M3_private = glo_M3_private = {}));
+//export declare module "glo_M4_private" {
+// export function f1();
+// export class c1 {
+// }
+// export var v1: { new (): c1; };
+// export var v2: c1;
+//}
+var glo_im1_private = glo_M1_public;
exports.glo_im1_private_v1_public = glo_im1_private.c1;
exports.glo_im1_private_v2_public = new glo_im1_private.c1();
exports.glo_im1_private_v3_public = glo_im1_private.f1;
@@ -521,6 +529,16 @@ var glo_im1_private_v1_private = glo_im1_private.c1;
var glo_im1_private_v2_private = new glo_im1_private.c1();
var glo_im1_private_v3_private = glo_im1_private.f1;
var glo_im1_private_v4_private = glo_im1_private.f1();
+//import glo_im2_private = require("glo_M2_public");
+//export var glo_im2_private_v1_public = glo_im2_private.c1;
+//export var glo_im2_private_v2_public = new glo_im2_private.c1();
+//export var glo_im2_private_v3_public = glo_im2_private.f1;
+//export var glo_im2_private_v4_public = glo_im2_private.f1();
+//var glo_im2_private_v1_private = glo_im2_private.c1;
+//var glo_im2_private_v2_private = new glo_im2_private.c1();
+//var glo_im2_private_v3_private = glo_im2_private.f1;
+//var glo_im2_private_v4_private = glo_im2_private.f1();
+var glo_im3_private = glo_M3_private;
exports.glo_im3_private_v1_public = glo_im3_private.c1;
exports.glo_im3_private_v2_public = new glo_im3_private.c1();
exports.glo_im3_private_v3_public = glo_im3_private.f1;
@@ -529,6 +547,18 @@ var glo_im3_private_v1_private = glo_im3_private.c1;
var glo_im3_private_v2_private = new glo_im3_private.c1();
var glo_im3_private_v3_private = glo_im3_private.f1;
var glo_im3_private_v4_private = glo_im3_private.f1();
+//import glo_im4_private = require("glo_M4_private");
+//export var glo_im4_private_v1_public = glo_im4_private.c1;
+//export var glo_im4_private_v2_public = new glo_im4_private.c1();
+//export var glo_im4_private_v3_public = glo_im4_private.f1;
+//export var glo_im4_private_v4_public = glo_im4_private.f1();
+//var glo_im4_private_v1_private = glo_im4_private.c1;
+//var glo_im4_private_v2_private = new glo_im4_private.c1();
+//var glo_im4_private_v3_private = glo_im4_private.f1;
+//var glo_im4_private_v4_private = glo_im4_private.f1();
+// Parse error to export module
+exports.glo_im1_public = glo_M1_public;
+exports.glo_im2_public = glo_M3_private;
//export import glo_im3_public = require("glo_M2_public");
//export import glo_im4_public = require("glo_M4_private");
//export declare module "use_glo_M1_public" {
diff --git a/testdata/baselines/reference/submodule/compiler/privacyImport.js.diff b/testdata/baselines/reference/submodule/compiler/privacyImport.js.diff
index e324fbd386..0063052b32 100644
--- a/testdata/baselines/reference/submodule/compiler/privacyImport.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/privacyImport.js.diff
@@ -1,15 +1,6 @@
--- old.privacyImport.js
+++ new.privacyImport.js
-@@= skipped -360, +360 lines =@@
- //// [privacyImport.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.m3 = exports.glo_im2_public = exports.glo_im1_public = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
-+exports.m3 = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
- var m1;
- (function (m1) {
- let m1_M1_public;
-@@= skipped -57, +57 lines =@@
+@@= skipped -417, +417 lines =@@
var m1_im2_private_v2_private = new m1_im2_private.c1();
var m1_im2_private_v3_private = m1_im2_private.f1;
var m1_im2_private_v4_private = m1_im2_private.f1();
@@ -59,55 +50,4 @@
- // Parse error to export module
m2.m1_im1_public = m2_M1_public;
m2.m1_im2_public = m2_M2_private;
- //export import m1_im3_public = require("m2_M3_public");
-@@= skipped -53, +34 lines =@@
- glo_M3_private.f1 = f1;
- glo_M3_private.v1 = c1;
- })(glo_M3_private || (exports.glo_M3_private = glo_M3_private = {}));
--//export declare module "glo_M4_private" {
--// export function f1();
--// export class c1 {
--// }
--// export var v1: { new (): c1; };
--// export var v2: c1;
--//}
--var glo_im1_private = glo_M1_public;
- exports.glo_im1_private_v1_public = glo_im1_private.c1;
- exports.glo_im1_private_v2_public = new glo_im1_private.c1();
- exports.glo_im1_private_v3_public = glo_im1_private.f1;
-@@= skipped -16, +8 lines =@@
- var glo_im1_private_v2_private = new glo_im1_private.c1();
- var glo_im1_private_v3_private = glo_im1_private.f1;
- var glo_im1_private_v4_private = glo_im1_private.f1();
--//import glo_im2_private = require("glo_M2_public");
--//export var glo_im2_private_v1_public = glo_im2_private.c1;
--//export var glo_im2_private_v2_public = new glo_im2_private.c1();
--//export var glo_im2_private_v3_public = glo_im2_private.f1;
--//export var glo_im2_private_v4_public = glo_im2_private.f1();
--//var glo_im2_private_v1_private = glo_im2_private.c1;
--//var glo_im2_private_v2_private = new glo_im2_private.c1();
--//var glo_im2_private_v3_private = glo_im2_private.f1;
--//var glo_im2_private_v4_private = glo_im2_private.f1();
--var glo_im3_private = glo_M3_private;
- exports.glo_im3_private_v1_public = glo_im3_private.c1;
- exports.glo_im3_private_v2_public = new glo_im3_private.c1();
- exports.glo_im3_private_v3_public = glo_im3_private.f1;
-@@= skipped -18, +8 lines =@@
- var glo_im3_private_v2_private = new glo_im3_private.c1();
- var glo_im3_private_v3_private = glo_im3_private.f1;
- var glo_im3_private_v4_private = glo_im3_private.f1();
--//import glo_im4_private = require("glo_M4_private");
--//export var glo_im4_private_v1_public = glo_im4_private.c1;
--//export var glo_im4_private_v2_public = new glo_im4_private.c1();
--//export var glo_im4_private_v3_public = glo_im4_private.f1;
--//export var glo_im4_private_v4_public = glo_im4_private.f1();
--//var glo_im4_private_v1_private = glo_im4_private.c1;
--//var glo_im4_private_v2_private = new glo_im4_private.c1();
--//var glo_im4_private_v3_private = glo_im4_private.f1;
--//var glo_im4_private_v4_private = glo_im4_private.f1();
--// Parse error to export module
--exports.glo_im1_public = glo_M1_public;
--exports.glo_im2_public = glo_M3_private;
- //export import glo_im3_public = require("glo_M2_public");
- //export import glo_im4_public = require("glo_M4_private");
- //export declare module "use_glo_M1_public" {
\ No newline at end of file
+ //export import m1_im3_public = require("m2_M3_public");
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js b/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js
index e5241eadac..5f801e2f91 100644
--- a/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js
+++ b/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js
@@ -361,7 +361,7 @@ export module m3 {
//// [privacyImportParseErrors.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.m3 = exports.glo_im4_private_v4_public = exports.glo_im4_private_v3_public = exports.glo_im4_private_v2_public = exports.glo_im4_private_v1_public = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im2_private_v4_public = exports.glo_im2_private_v3_public = exports.glo_im2_private_v2_public = exports.glo_im2_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
+exports.m3 = exports.glo_im2_public = exports.glo_im1_public = exports.glo_im4_private_v4_public = exports.glo_im4_private_v3_public = exports.glo_im4_private_v2_public = exports.glo_im4_private_v1_public = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im2_private_v4_public = exports.glo_im2_private_v3_public = exports.glo_im2_private_v2_public = exports.glo_im2_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
var m1;
(function (m1) {
let m1_M1_public;
@@ -514,6 +514,7 @@ var glo_M3_private;
glo_M3_private.f1 = f1;
glo_M3_private.v1 = c1;
})(glo_M3_private || (exports.glo_M3_private = glo_M3_private = {}));
+var glo_im1_private = glo_M1_public;
exports.glo_im1_private_v1_public = glo_im1_private.c1;
exports.glo_im1_private_v2_public = new glo_im1_private.c1();
exports.glo_im1_private_v3_public = glo_im1_private.f1;
@@ -531,6 +532,7 @@ var glo_im2_private_v1_private = glo_im2_private.c1;
var glo_im2_private_v2_private = new glo_im2_private.c1();
var glo_im2_private_v3_private = glo_im2_private.f1;
var glo_im2_private_v4_private = glo_im2_private.f1();
+var glo_im3_private = glo_M3_private;
exports.glo_im3_private_v1_public = glo_im3_private.c1;
exports.glo_im3_private_v2_public = new glo_im3_private.c1();
exports.glo_im3_private_v3_public = glo_im3_private.f1;
@@ -548,6 +550,9 @@ var glo_im4_private_v1_private = glo_im4_private.c1;
var glo_im4_private_v2_private = new glo_im4_private.c1();
var glo_im4_private_v3_private = glo_im4_private.f1;
var glo_im4_private_v4_private = glo_im4_private.f1();
+// Parse error to export module
+exports.glo_im1_public = glo_M1_public;
+exports.glo_im2_public = glo_M3_private;
exports.glo_im3_public = require("glo_M2_public");
exports.glo_im4_public = require("glo_M4_private");
(function (m2_1) {
diff --git a/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js.diff b/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js.diff
index 9d398d9c48..6a45abcb87 100644
--- a/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/privacyImportParseErrors.js.diff
@@ -1,15 +1,6 @@
--- old.privacyImportParseErrors.js
+++ new.privacyImportParseErrors.js
-@@= skipped -360, +360 lines =@@
- //// [privacyImportParseErrors.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.m3 = exports.glo_im2_public = exports.glo_im1_public = exports.glo_im4_private_v4_public = exports.glo_im4_private_v3_public = exports.glo_im4_private_v2_public = exports.glo_im4_private_v1_public = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im2_private_v4_public = exports.glo_im2_private_v3_public = exports.glo_im2_private_v2_public = exports.glo_im2_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
-+exports.m3 = exports.glo_im4_private_v4_public = exports.glo_im4_private_v3_public = exports.glo_im4_private_v2_public = exports.glo_im4_private_v1_public = exports.glo_im3_private_v4_public = exports.glo_im3_private_v3_public = exports.glo_im3_private_v2_public = exports.glo_im3_private_v1_public = exports.glo_im2_private_v4_public = exports.glo_im2_private_v3_public = exports.glo_im2_private_v2_public = exports.glo_im2_private_v1_public = exports.glo_im1_private_v4_public = exports.glo_im1_private_v3_public = exports.glo_im1_private_v2_public = exports.glo_im1_private_v1_public = exports.glo_M3_private = exports.glo_M1_public = exports.m1 = void 0;
- var m1;
- (function (m1) {
- let m1_M1_public;
-@@= skipped -43, +43 lines =@@
+@@= skipped -403, +403 lines =@@
var m1_im2_private_v2_private = new m1_im2_private.c1();
var m1_im2_private_v3_private = m1_im2_private.f1;
var m1_im2_private_v4_private = m1_im2_private.f1();
@@ -62,29 +53,7 @@
})(m2 || (m2 = {}));
var glo_M1_public;
(function (glo_M1_public) {
-@@= skipped -26, +27 lines =@@
- glo_M3_private.f1 = f1;
- glo_M3_private.v1 = c1;
- })(glo_M3_private || (exports.glo_M3_private = glo_M3_private = {}));
--var glo_im1_private = glo_M1_public;
- exports.glo_im1_private_v1_public = glo_im1_private.c1;
- exports.glo_im1_private_v2_public = new glo_im1_private.c1();
- exports.glo_im1_private_v3_public = glo_im1_private.f1;
-@@= skipped -18, +17 lines =@@
- var glo_im2_private_v2_private = new glo_im2_private.c1();
- var glo_im2_private_v3_private = glo_im2_private.f1;
- var glo_im2_private_v4_private = glo_im2_private.f1();
--var glo_im3_private = glo_M3_private;
- exports.glo_im3_private_v1_public = glo_im3_private.c1;
- exports.glo_im3_private_v2_public = new glo_im3_private.c1();
- exports.glo_im3_private_v3_public = glo_im3_private.f1;
-@@= skipped -18, +17 lines =@@
- var glo_im4_private_v2_private = new glo_im4_private.c1();
- var glo_im4_private_v3_private = glo_im4_private.f1;
- var glo_im4_private_v4_private = glo_im4_private.f1();
--// Parse error to export module
--exports.glo_im1_public = glo_M1_public;
--exports.glo_im2_public = glo_M3_private;
+@@= skipped -68, +69 lines =@@
exports.glo_im3_public = require("glo_M2_public");
exports.glo_im4_public = require("glo_M4_private");
(function (m2_1) {
diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js
index 909c8dd6d6..f06cca0004 100644
--- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js
+++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js
@@ -13,13 +13,15 @@ var y = new b();
//// [sourceMapValidationImport.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.m = void 0;
+exports.b = exports.m = void 0;
var m;
(function (m) {
class c {
}
m.c = c;
})(m || (exports.m = m = {}));
+var a = m.c;
+exports.b = m.c;
var x = new a();
var y = new exports.b();
//# sourceMappingURL=sourceMapValidationImport.js.map
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.diff
deleted file mode 100644
index ae66379d1b..0000000000
--- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.diff
+++ /dev/null
@@ -1,19 +0,0 @@
---- old.sourceMapValidationImport.js
-+++ new.sourceMapValidationImport.js
-@@= skipped -12, +12 lines =@@
- //// [sourceMapValidationImport.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.b = exports.m = void 0;
-+exports.m = void 0;
- var m;
- (function (m) {
- class c {
- }
- m.c = c;
- })(m || (exports.m = m = {}));
--var a = m.c;
--exports.b = m.c;
- var x = new a();
- var y = new exports.b();
- //# sourceMappingURL=sourceMapValidationImport.js.map
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map
index 7be6e8373e..b0e4f78653 100644
--- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map
+++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map
@@ -1,3 +1,3 @@
//// [sourceMapValidationImport.js.map]
-{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":[],"mappings":";;;AAAA,IAAc,CAGb;AAHD,WAAc,CAAC,EAAC;IACZ,MAAa,CAAC;KACb;IADY,EAAA,CAAC,IACb,CAAA;AAAA,CACJ,EAHa,CAAC,aAAD,CAAC,GAAD,CAAC,QAGd;AAGD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,QAAA,CAAC,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMubSA9IHZvaWQgMDsNCnZhciBtOw0KKGZ1bmN0aW9uIChtKSB7DQogICAgY2xhc3MgYyB7DQogICAgfQ0KICAgIG0uYyA9IGM7DQp9KShtIHx8IChleHBvcnRzLm0gPSBtID0ge30pKTsNCnZhciB4ID0gbmV3IGEoKTsNCnZhciB5ID0gbmV3IGV4cG9ydHMuYigpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25JbXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBYyxDQUdiO0FBSEQsV0FBYyxDQUFDLEVBQUM7SUFDWixNQUFhLENBQUM7S0FDYjtJQURZLEVBQUEsQ0FBQyxJQUNiLENBQUE7QUFBQSxDQUNKLEVBSGEsQ0FBQyxhQUFELENBQUMsR0FBRCxDQUFDLFFBR2Q7QUFHRCxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFDO0FBQ2hCLElBQUksQ0FBQyxHQUFHLElBQUksUUFBQSxDQUFDLEVBQUUsQ0FBQyJ9,ZXhwb3J0IG1vZHVsZSBtIHsKICAgIGV4cG9ydCBjbGFzcyBjIHsKICAgIH0KfQppbXBvcnQgYSA9IG0uYzsKZXhwb3J0IGltcG9ydCBiID0gbS5jOwp2YXIgeCA9IG5ldyBhKCk7CnZhciB5ID0gbmV3IGIoKTs=
+{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":[],"mappings":";;;AAAA,IAAc,CAGb;AAHD,WAAc,CAAC,EAAC;IACZ,MAAa,CAAC;KACb;IADY,EAAA,CAAC,IACb,CAAA;AAAA,CACJ,EAHa,CAAC,aAAD,CAAC,GAAD,CAAC,QAGd;AACD,IAAO,CAAC,GAAG,GAAG,CAAC;AACD,QAAA,CAAC,GAAG,GAAG,CAAC;AACtB,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,QAAA,CAAC,EAAE,CAAC"}
+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuYiA9IGV4cG9ydHMubSA9IHZvaWQgMDsNCnZhciBtOw0KKGZ1bmN0aW9uIChtKSB7DQogICAgY2xhc3MgYyB7DQogICAgfQ0KICAgIG0uYyA9IGM7DQp9KShtIHx8IChleHBvcnRzLm0gPSBtID0ge30pKTsNCnZhciBhID0gbS5jOw0KZXhwb3J0cy5iID0gbS5jOw0KdmFyIHggPSBuZXcgYSgpOw0KdmFyIHkgPSBuZXcgZXhwb3J0cy5iKCk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zb3VyY2VNYXBWYWxpZGF0aW9uSW1wb3J0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25JbXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBYyxDQUdiO0FBSEQsV0FBYyxDQUFDLEVBQUM7SUFDWixNQUFhLENBQUM7S0FDYjtJQURZLEVBQUEsQ0FBQyxJQUNiLENBQUE7QUFBQSxDQUNKLEVBSGEsQ0FBQyxhQUFELENBQUMsR0FBRCxDQUFDLFFBR2Q7QUFDRCxJQUFPLENBQUMsR0FBRyxHQUFHLENBQUM7QUFDRCxRQUFBLENBQUMsR0FBRyxHQUFHLENBQUM7QUFDdEIsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNoQixJQUFJLENBQUMsR0FBRyxJQUFJLFFBQUEsQ0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IG1vZHVsZSBtIHsKICAgIGV4cG9ydCBjbGFzcyBjIHsKICAgIH0KfQppbXBvcnQgYSA9IG0uYzsKZXhwb3J0IGltcG9ydCBiID0gbS5jOwp2YXIgeCA9IG5ldyBhKCk7CnZhciB5ID0gbmV3IGIoKTs=
diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map.diff
index b08e97cb82..9d9110e219 100644
--- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map.diff
+++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.js.map.diff
@@ -4,5 +4,5 @@
//// [sourceMapValidationImport.js.map]
-{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":[],"mappings":";;;AAAA,IAAc,CAAC,CAGd;AAHD,WAAc,CAAC;IACX,MAAa,CAAC;KACb;IADY,GAAC,IACb,CAAA;AACL,CAAC,EAHa,CAAC,iBAAD,CAAC,QAGd;AACD,IAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACD,QAAA,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACtB,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,SAAC,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuYiA9IGV4cG9ydHMubSA9IHZvaWQgMDsNCnZhciBtOw0KKGZ1bmN0aW9uIChtKSB7DQogICAgY2xhc3MgYyB7DQogICAgfQ0KICAgIG0uYyA9IGM7DQp9KShtIHx8IChleHBvcnRzLm0gPSBtID0ge30pKTsNCnZhciBhID0gbS5jOw0KZXhwb3J0cy5iID0gbS5jOw0KdmFyIHggPSBuZXcgYSgpOw0KdmFyIHkgPSBuZXcgZXhwb3J0cy5iKCk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zb3VyY2VNYXBWYWxpZGF0aW9uSW1wb3J0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25JbXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBYyxDQUFDLENBR2Q7QUFIRCxXQUFjLENBQUM7SUFDWCxNQUFhLENBQUM7S0FDYjtJQURZLEdBQUMsSUFDYixDQUFBO0FBQ0wsQ0FBQyxFQUhhLENBQUMsaUJBQUQsQ0FBQyxRQUdkO0FBQ0QsSUFBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNELFFBQUEsQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDdEIsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNoQixJQUFJLENBQUMsR0FBRyxJQUFJLFNBQUMsRUFBRSxDQUFDIn0=,ZXhwb3J0IG1vZHVsZSBtIHsKICAgIGV4cG9ydCBjbGFzcyBjIHsKICAgIH0KfQppbXBvcnQgYSA9IG0uYzsKZXhwb3J0IGltcG9ydCBiID0gbS5jOwp2YXIgeCA9IG5ldyBhKCk7CnZhciB5ID0gbmV3IGIoKTs=
-+{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":[],"mappings":";;;AAAA,IAAc,CAGb;AAHD,WAAc,CAAC,EAAC;IACZ,MAAa,CAAC;KACb;IADY,EAAA,CAAC,IACb,CAAA;AAAA,CACJ,EAHa,CAAC,aAAD,CAAC,GAAD,CAAC,QAGd;AAGD,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,QAAA,CAAC,EAAE,CAAC"}
-+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMubSA9IHZvaWQgMDsNCnZhciBtOw0KKGZ1bmN0aW9uIChtKSB7DQogICAgY2xhc3MgYyB7DQogICAgfQ0KICAgIG0uYyA9IGM7DQp9KShtIHx8IChleHBvcnRzLm0gPSBtID0ge30pKTsNCnZhciB4ID0gbmV3IGEoKTsNCnZhciB5ID0gbmV3IGV4cG9ydHMuYigpOw0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9c291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25JbXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBYyxDQUdiO0FBSEQsV0FBYyxDQUFDLEVBQUM7SUFDWixNQUFhLENBQUM7S0FDYjtJQURZLEVBQUEsQ0FBQyxJQUNiLENBQUE7QUFBQSxDQUNKLEVBSGEsQ0FBQyxhQUFELENBQUMsR0FBRCxDQUFDLFFBR2Q7QUFHRCxJQUFJLENBQUMsR0FBRyxJQUFJLENBQUMsRUFBRSxDQUFDO0FBQ2hCLElBQUksQ0FBQyxHQUFHLElBQUksUUFBQSxDQUFDLEVBQUUsQ0FBQyJ9,ZXhwb3J0IG1vZHVsZSBtIHsKICAgIGV4cG9ydCBjbGFzcyBjIHsKICAgIH0KfQppbXBvcnQgYSA9IG0uYzsKZXhwb3J0IGltcG9ydCBiID0gbS5jOwp2YXIgeCA9IG5ldyBhKCk7CnZhciB5ID0gbmV3IGIoKTs=
\ No newline at end of file
++{"version":3,"file":"sourceMapValidationImport.js","sourceRoot":"","sources":["sourceMapValidationImport.ts"],"names":[],"mappings":";;;AAAA,IAAc,CAGb;AAHD,WAAc,CAAC,EAAC;IACZ,MAAa,CAAC;KACb;IADY,EAAA,CAAC,IACb,CAAA;AAAA,CACJ,EAHa,CAAC,aAAD,CAAC,GAAD,CAAC,QAGd;AACD,IAAO,CAAC,GAAG,GAAG,CAAC;AACD,QAAA,CAAC,GAAG,GAAG,CAAC;AACtB,IAAI,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAChB,IAAI,CAAC,GAAG,IAAI,QAAA,CAAC,EAAE,CAAC"}
++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMuYiA9IGV4cG9ydHMubSA9IHZvaWQgMDsNCnZhciBtOw0KKGZ1bmN0aW9uIChtKSB7DQogICAgY2xhc3MgYyB7DQogICAgfQ0KICAgIG0uYyA9IGM7DQp9KShtIHx8IChleHBvcnRzLm0gPSBtID0ge30pKTsNCnZhciBhID0gbS5jOw0KZXhwb3J0cy5iID0gbS5jOw0KdmFyIHggPSBuZXcgYSgpOw0KdmFyIHkgPSBuZXcgZXhwb3J0cy5iKCk7DQovLyMgc291cmNlTWFwcGluZ1VSTD1zb3VyY2VNYXBWYWxpZGF0aW9uSW1wb3J0LmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic291cmNlTWFwVmFsaWRhdGlvbkltcG9ydC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInNvdXJjZU1hcFZhbGlkYXRpb25JbXBvcnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsSUFBYyxDQUdiO0FBSEQsV0FBYyxDQUFDLEVBQUM7SUFDWixNQUFhLENBQUM7S0FDYjtJQURZLEVBQUEsQ0FBQyxJQUNiLENBQUE7QUFBQSxDQUNKLEVBSGEsQ0FBQyxhQUFELENBQUMsR0FBRCxDQUFDLFFBR2Q7QUFDRCxJQUFPLENBQUMsR0FBRyxHQUFHLENBQUM7QUFDRCxRQUFBLENBQUMsR0FBRyxHQUFHLENBQUM7QUFDdEIsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEVBQUUsQ0FBQztBQUNoQixJQUFJLENBQUMsR0FBRyxJQUFJLFFBQUEsQ0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IG1vZHVsZSBtIHsKICAgIGV4cG9ydCBjbGFzcyBjIHsKICAgIH0KfQppbXBvcnQgYSA9IG0uYzsKZXhwb3J0IGltcG9ydCBiID0gbS5jOwp2YXIgeCA9IG5ldyBhKCk7CnZhciB5ID0gbmV3IGIoKTs=
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt
index bbb67c4c77..a3a57e53bb 100644
--- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt
+++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt
@@ -10,7 +10,7 @@ sourceFile:sourceMapValidationImport.ts
-------------------------------------------------------------------
>>>"use strict";
>>>Object.defineProperty(exports, "__esModule", { value: true });
->>>exports.m = void 0;
+>>>exports.b = exports.m = void 0;
>>>var m;
1 >
2 >^^^^
@@ -111,19 +111,61 @@ sourceFile:sourceMapValidationImport.ts
8 >Emitted(9, 23) Source(1, 16) + SourceIndex(0)
9 >Emitted(9, 31) Source(4, 2) + SourceIndex(0)
---
->>>var x = new a();
+>>>var a = m.c;
1 >
2 >^^^^
3 > ^
4 > ^^^
+5 > ^^^
+6 > ^
+7 > ^^^^^->
+1 >
+ >
+2 >import
+3 > a
+4 > =
+5 > m.c
+6 > ;
+1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0)
+2 >Emitted(10, 5) Source(5, 8) + SourceIndex(0)
+3 >Emitted(10, 6) Source(5, 9) + SourceIndex(0)
+4 >Emitted(10, 9) Source(5, 12) + SourceIndex(0)
+5 >Emitted(10, 12) Source(5, 15) + SourceIndex(0)
+6 >Emitted(10, 13) Source(5, 16) + SourceIndex(0)
+---
+>>>exports.b = m.c;
+1->
+2 >^^^^^^^^
+3 > ^
+4 > ^^^
+5 > ^^^
+6 > ^
+7 > ^->
+1->
+ >export import
+2 >
+3 > b
+4 > =
+5 > m.c
+6 > ;
+1->Emitted(11, 1) Source(6, 15) + SourceIndex(0)
+2 >Emitted(11, 9) Source(6, 15) + SourceIndex(0)
+3 >Emitted(11, 10) Source(6, 16) + SourceIndex(0)
+4 >Emitted(11, 13) Source(6, 19) + SourceIndex(0)
+5 >Emitted(11, 16) Source(6, 22) + SourceIndex(0)
+6 >Emitted(11, 17) Source(6, 23) + SourceIndex(0)
+---
+>>>var x = new a();
+1->
+2 >^^^^
+3 > ^
+4 > ^^^
5 > ^^^^
6 > ^
7 > ^^
8 > ^
9 > ^^^^^^^^^->
-1 >
- >import a = m.c;
- >export import b = m.c;
+1->
>
2 >var
3 > x
@@ -132,14 +174,14 @@ sourceFile:sourceMapValidationImport.ts
6 > a
7 > ()
8 > ;
-1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0)
-2 >Emitted(10, 5) Source(7, 5) + SourceIndex(0)
-3 >Emitted(10, 6) Source(7, 6) + SourceIndex(0)
-4 >Emitted(10, 9) Source(7, 9) + SourceIndex(0)
-5 >Emitted(10, 13) Source(7, 13) + SourceIndex(0)
-6 >Emitted(10, 14) Source(7, 14) + SourceIndex(0)
-7 >Emitted(10, 16) Source(7, 16) + SourceIndex(0)
-8 >Emitted(10, 17) Source(7, 17) + SourceIndex(0)
+1->Emitted(12, 1) Source(7, 1) + SourceIndex(0)
+2 >Emitted(12, 5) Source(7, 5) + SourceIndex(0)
+3 >Emitted(12, 6) Source(7, 6) + SourceIndex(0)
+4 >Emitted(12, 9) Source(7, 9) + SourceIndex(0)
+5 >Emitted(12, 13) Source(7, 13) + SourceIndex(0)
+6 >Emitted(12, 14) Source(7, 14) + SourceIndex(0)
+7 >Emitted(12, 16) Source(7, 16) + SourceIndex(0)
+8 >Emitted(12, 17) Source(7, 17) + SourceIndex(0)
---
>>>var y = new exports.b();
1->
@@ -162,14 +204,14 @@ sourceFile:sourceMapValidationImport.ts
7 > b
8 > ()
9 > ;
-1->Emitted(11, 1) Source(8, 1) + SourceIndex(0)
-2 >Emitted(11, 5) Source(8, 5) + SourceIndex(0)
-3 >Emitted(11, 6) Source(8, 6) + SourceIndex(0)
-4 >Emitted(11, 9) Source(8, 9) + SourceIndex(0)
-5 >Emitted(11, 13) Source(8, 13) + SourceIndex(0)
-6 >Emitted(11, 21) Source(8, 13) + SourceIndex(0)
-7 >Emitted(11, 22) Source(8, 14) + SourceIndex(0)
-8 >Emitted(11, 24) Source(8, 16) + SourceIndex(0)
-9 >Emitted(11, 25) Source(8, 17) + SourceIndex(0)
+1->Emitted(13, 1) Source(8, 1) + SourceIndex(0)
+2 >Emitted(13, 5) Source(8, 5) + SourceIndex(0)
+3 >Emitted(13, 6) Source(8, 6) + SourceIndex(0)
+4 >Emitted(13, 9) Source(8, 9) + SourceIndex(0)
+5 >Emitted(13, 13) Source(8, 13) + SourceIndex(0)
+6 >Emitted(13, 21) Source(8, 13) + SourceIndex(0)
+7 >Emitted(13, 22) Source(8, 14) + SourceIndex(0)
+8 >Emitted(13, 24) Source(8, 16) + SourceIndex(0)
+9 >Emitted(13, 25) Source(8, 17) + SourceIndex(0)
---
>>>//# sourceMappingURL=sourceMapValidationImport.js.map
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt.diff
index ba4b673155..06cab12e09 100644
--- a/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/sourceMapValidationImport.sourcemap.txt.diff
@@ -1,12 +1,6 @@
--- old.sourceMapValidationImport.sourcemap.txt
+++ new.sourceMapValidationImport.sourcemap.txt
-@@= skipped -9, +9 lines =@@
- -------------------------------------------------------------------
- >>>"use strict";
- >>>Object.defineProperty(exports, "__esModule", { value: true });
-->>>exports.b = exports.m = void 0;
-+>>>exports.m = void 0;
- >>>var m;
+@@= skipped -14, +14 lines =@@
1 >
2 >^^^^
3 > ^
@@ -60,7 +54,7 @@
2 >Emitted(6, 11) Source(2, 18) + SourceIndex(0)
3 >Emitted(6, 12) Source(2, 19) + SourceIndex(0)
---
-@@= skipped -52, +51 lines =@@
+@@= skipped -47, +46 lines =@@
---
>>> m.c = c;
1->^^^^
@@ -129,109 +123,85 @@
-5 >Emitted(9, 22) Source(1, 15) + SourceIndex(0)
-6 >Emitted(9, 23) Source(1, 16) + SourceIndex(0)
-7 >Emitted(9, 31) Source(4, 2) + SourceIndex(0)
-----
-->>>var a = m.c;
--1 >
--2 >^^^^
--3 > ^
--4 > ^^^
++5 >Emitted(9, 18) Source(1, 15) + SourceIndex(0)
++6 >Emitted(9, 19) Source(1, 16) + SourceIndex(0)
++7 >Emitted(9, 22) Source(1, 15) + SourceIndex(0)
++8 >Emitted(9, 23) Source(1, 16) + SourceIndex(0)
++9 >Emitted(9, 31) Source(4, 2) + SourceIndex(0)
+ ---
+ >>>var a = m.c;
+ 1 >
+ 2 >^^^^
+ 3 > ^
+ 4 > ^^^
-5 > ^
-6 > ^
-7 > ^
-8 > ^
-9 > ^^^^^->
--1 >
-- >
--2 >import
--3 > a
--4 > =
++5 > ^^^
++6 > ^
++7 > ^^^^^->
+ 1 >
+ >
+ 2 >import
+ 3 > a
+ 4 > =
-5 > m
-6 > .
-7 > c
-8 > ;
--1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0)
--2 >Emitted(10, 5) Source(5, 8) + SourceIndex(0)
--3 >Emitted(10, 6) Source(5, 9) + SourceIndex(0)
--4 >Emitted(10, 9) Source(5, 12) + SourceIndex(0)
++5 > m.c
++6 > ;
+ 1 >Emitted(10, 1) Source(5, 1) + SourceIndex(0)
+ 2 >Emitted(10, 5) Source(5, 8) + SourceIndex(0)
+ 3 >Emitted(10, 6) Source(5, 9) + SourceIndex(0)
+ 4 >Emitted(10, 9) Source(5, 12) + SourceIndex(0)
-5 >Emitted(10, 10) Source(5, 13) + SourceIndex(0)
-6 >Emitted(10, 11) Source(5, 14) + SourceIndex(0)
-7 >Emitted(10, 12) Source(5, 15) + SourceIndex(0)
-8 >Emitted(10, 13) Source(5, 16) + SourceIndex(0)
-----
-->>>exports.b = m.c;
--1->
--2 >^^^^^^^^
--3 > ^
--4 > ^^^
++5 >Emitted(10, 12) Source(5, 15) + SourceIndex(0)
++6 >Emitted(10, 13) Source(5, 16) + SourceIndex(0)
+ ---
+ >>>exports.b = m.c;
+ 1->
+ 2 >^^^^^^^^
+ 3 > ^
+ 4 > ^^^
-5 > ^
-6 > ^
-7 > ^
-8 > ^
-9 > ^->
--1->
-- >export import
--2 >
--3 > b
--4 > =
++5 > ^^^
++6 > ^
++7 > ^->
+ 1->
+ >export import
+ 2 >
+ 3 > b
+ 4 > =
-5 > m
-6 > .
-7 > c
-8 > ;
--1->Emitted(11, 1) Source(6, 15) + SourceIndex(0)
--2 >Emitted(11, 9) Source(6, 15) + SourceIndex(0)
--3 >Emitted(11, 10) Source(6, 16) + SourceIndex(0)
--4 >Emitted(11, 13) Source(6, 19) + SourceIndex(0)
++5 > m.c
++6 > ;
+ 1->Emitted(11, 1) Source(6, 15) + SourceIndex(0)
+ 2 >Emitted(11, 9) Source(6, 15) + SourceIndex(0)
+ 3 >Emitted(11, 10) Source(6, 16) + SourceIndex(0)
+ 4 >Emitted(11, 13) Source(6, 19) + SourceIndex(0)
-5 >Emitted(11, 14) Source(6, 20) + SourceIndex(0)
-6 >Emitted(11, 15) Source(6, 21) + SourceIndex(0)
-7 >Emitted(11, 16) Source(6, 22) + SourceIndex(0)
-8 >Emitted(11, 17) Source(6, 23) + SourceIndex(0)
-+5 >Emitted(9, 18) Source(1, 15) + SourceIndex(0)
-+6 >Emitted(9, 19) Source(1, 16) + SourceIndex(0)
-+7 >Emitted(9, 22) Source(1, 15) + SourceIndex(0)
-+8 >Emitted(9, 23) Source(1, 16) + SourceIndex(0)
-+9 >Emitted(9, 31) Source(4, 2) + SourceIndex(0)
++5 >Emitted(11, 16) Source(6, 22) + SourceIndex(0)
++6 >Emitted(11, 17) Source(6, 23) + SourceIndex(0)
---
>>>var x = new a();
--1->
-+1 >
- 2 >^^^^
- 3 > ^
- 4 > ^^^
-@@= skipped -107, +60 lines =@@
- 7 > ^^
- 8 > ^
- 9 > ^^^^^^^^^->
--1->
-+1 >
-+ >import a = m.c;
-+ >export import b = m.c;
- >
- 2 >var
- 3 > x
-@@= skipped -9, +11 lines =@@
- 6 > a
- 7 > ()
- 8 > ;
--1->Emitted(12, 1) Source(7, 1) + SourceIndex(0)
--2 >Emitted(12, 5) Source(7, 5) + SourceIndex(0)
--3 >Emitted(12, 6) Source(7, 6) + SourceIndex(0)
--4 >Emitted(12, 9) Source(7, 9) + SourceIndex(0)
--5 >Emitted(12, 13) Source(7, 13) + SourceIndex(0)
--6 >Emitted(12, 14) Source(7, 14) + SourceIndex(0)
--7 >Emitted(12, 16) Source(7, 16) + SourceIndex(0)
--8 >Emitted(12, 17) Source(7, 17) + SourceIndex(0)
-+1 >Emitted(10, 1) Source(7, 1) + SourceIndex(0)
-+2 >Emitted(10, 5) Source(7, 5) + SourceIndex(0)
-+3 >Emitted(10, 6) Source(7, 6) + SourceIndex(0)
-+4 >Emitted(10, 9) Source(7, 9) + SourceIndex(0)
-+5 >Emitted(10, 13) Source(7, 13) + SourceIndex(0)
-+6 >Emitted(10, 14) Source(7, 14) + SourceIndex(0)
-+7 >Emitted(10, 16) Source(7, 16) + SourceIndex(0)
-+8 >Emitted(10, 17) Source(7, 17) + SourceIndex(0)
- ---
- >>>var y = new exports.b();
1->
-@@= skipped -15, +15 lines =@@
+@@= skipped -131, +128 lines =@@
3 > ^
4 > ^^^
5 > ^^^^
@@ -253,26 +223,21 @@
-6 > b
-7 > ()
-8 > ;
--1->Emitted(13, 1) Source(8, 1) + SourceIndex(0)
--2 >Emitted(13, 5) Source(8, 5) + SourceIndex(0)
--3 >Emitted(13, 6) Source(8, 6) + SourceIndex(0)
--4 >Emitted(13, 9) Source(8, 9) + SourceIndex(0)
--5 >Emitted(13, 13) Source(8, 13) + SourceIndex(0)
--6 >Emitted(13, 22) Source(8, 14) + SourceIndex(0)
--7 >Emitted(13, 24) Source(8, 16) + SourceIndex(0)
--8 >Emitted(13, 25) Source(8, 17) + SourceIndex(0)
+6 >
+7 > b
+8 > ()
+9 > ;
-+1->Emitted(11, 1) Source(8, 1) + SourceIndex(0)
-+2 >Emitted(11, 5) Source(8, 5) + SourceIndex(0)
-+3 >Emitted(11, 6) Source(8, 6) + SourceIndex(0)
-+4 >Emitted(11, 9) Source(8, 9) + SourceIndex(0)
-+5 >Emitted(11, 13) Source(8, 13) + SourceIndex(0)
-+6 >Emitted(11, 21) Source(8, 13) + SourceIndex(0)
-+7 >Emitted(11, 22) Source(8, 14) + SourceIndex(0)
-+8 >Emitted(11, 24) Source(8, 16) + SourceIndex(0)
-+9 >Emitted(11, 25) Source(8, 17) + SourceIndex(0)
+ 1->Emitted(13, 1) Source(8, 1) + SourceIndex(0)
+ 2 >Emitted(13, 5) Source(8, 5) + SourceIndex(0)
+ 3 >Emitted(13, 6) Source(8, 6) + SourceIndex(0)
+ 4 >Emitted(13, 9) Source(8, 9) + SourceIndex(0)
+ 5 >Emitted(13, 13) Source(8, 13) + SourceIndex(0)
+-6 >Emitted(13, 22) Source(8, 14) + SourceIndex(0)
+-7 >Emitted(13, 24) Source(8, 16) + SourceIndex(0)
+-8 >Emitted(13, 25) Source(8, 17) + SourceIndex(0)
++6 >Emitted(13, 21) Source(8, 13) + SourceIndex(0)
++7 >Emitted(13, 22) Source(8, 14) + SourceIndex(0)
++8 >Emitted(13, 24) Source(8, 16) + SourceIndex(0)
++9 >Emitted(13, 25) Source(8, 17) + SourceIndex(0)
---
>>>//# sourceMappingURL=sourceMapValidationImport.js.map
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js b/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js
index 69091be182..ed0944bb5f 100644
--- a/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js
+++ b/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js
@@ -36,6 +36,7 @@ var Outer;
instantiated.C = C;
})(instantiated = Outer.instantiated || (Outer.instantiated = {}));
})(Outer || (Outer = {}));
+var importInst = Outer.instantiated;
var x1 = importInst.C;
var x2 = new x1();
var x3; // Error again
diff --git a/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js.diff b/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js.diff
deleted file mode 100644
index d8bec69ecb..0000000000
--- a/testdata/baselines/reference/submodule/compiler/typeofInternalModules.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.typeofInternalModules.js
-+++ new.typeofInternalModules.js
-@@= skipped -35, +35 lines =@@
- instantiated.C = C;
- })(instantiated = Outer.instantiated || (Outer.instantiated = {}));
- })(Outer || (Outer = {}));
--var importInst = Outer.instantiated;
- var x1 = importInst.C;
- var x2 = new x1();
- var x3; // Error again
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js b/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js
index ddc350515d..1d7da5610d 100644
--- a/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js
+++ b/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js
@@ -20,4 +20,5 @@ var M;
M.A = A;
new A;
})(M || (M = {}));
+var myA = M.A;
new myA;
diff --git a/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js.diff b/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js.diff
deleted file mode 100644
index 00f41cf051..0000000000
--- a/testdata/baselines/reference/submodule/conformance/classAbstractImportInstantiation.js.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.classAbstractImportInstantiation.js
-+++ new.classAbstractImportInstantiation.js
-@@= skipped -19, +19 lines =@@
- M.A = A;
- new A;
- })(M || (M = {}));
--var myA = M.A;
- new myA;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js b/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js
index 822167912b..d9ceca5c1c 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js
@@ -53,6 +53,8 @@ var E;
var M;
(function (M) {
})(M || (exports.M = M = {}));
+var a = M.x;
+exports.a = a;
//// [t2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js.diff
index 1e67688eee..821becd329 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports1-es6.js.diff
@@ -1,12 +1,6 @@
--- old.exportsAndImports1-es6.js
+++ new.exportsAndImports1-es6.js
-@@= skipped -52, +52 lines =@@
- var M;
- (function (M) {
- })(M || (exports.M = M = {}));
--var a = M.x;
--exports.a = a;
- //// [t2.js]
+@@= skipped -58, +58 lines =@@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = exports.M = exports.E = exports.C = exports.f = exports.v = void 0;
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js b/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js
index 0541b6f054..16869084a4 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js
@@ -53,6 +53,8 @@ var E;
var M;
(function (M) {
})(M || (exports.M = M = {}));
+var a = M.x;
+exports.a = a;
//// [t2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js.diff
index df765a46a5..b6316c9311 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports1.js.diff
@@ -1,12 +1,6 @@
--- old.exportsAndImports1.js
+++ new.exportsAndImports1.js
-@@= skipped -52, +52 lines =@@
- var M;
- (function (M) {
- })(M || (exports.M = M = {}));
--var a = M.x;
--exports.a = a;
- //// [t2.js]
+@@= skipped -58, +58 lines =@@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = exports.M = exports.E = exports.C = exports.f = exports.v = void 0;
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js
index 7dcf7b6fe3..e5d162710e 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js
@@ -36,7 +36,7 @@ export { v, f, C, I, E, D, M, N, T, a };
//// [t1.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.M = exports.E = exports.C = exports.v = void 0;
+exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
exports.f = f;
exports.f1 = f;
exports.v1 = exports.v = 1;
@@ -55,6 +55,8 @@ var E;
var M;
(function (M) {
})(M || (exports.M1 = exports.M = M = {}));
+exports.a1 = exports.a = M.x;
+exports.a1 = exports.a;
//// [t2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff
index 9c579adee2..08c13641a9 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff
@@ -1,11 +1,7 @@
--- old.exportsAndImports3-es6.js
+++ new.exportsAndImports3-es6.js
-@@= skipped -35, +35 lines =@@
- //// [t1.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
-+exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.M = exports.E = exports.C = exports.v = void 0;
+@@= skipped -38, +38 lines =@@
+ exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
exports.f = f;
exports.f1 = f;
-exports.v = 1;
@@ -13,12 +9,13 @@
exports.v1 = exports.v;
function f() { }
class C {
-@@= skipped -19, +19 lines =@@
+@@= skipped -16, +16 lines =@@
var M;
(function (M) {
})(M || (exports.M1 = exports.M = M = {}));
-exports.a = M.x;
--exports.a1 = exports.a;
++exports.a1 = exports.a = M.x;
+ exports.a1 = exports.a;
//// [t2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js
index e60d578770..164f368be8 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js
@@ -36,7 +36,7 @@ export { v, f, C, I, E, D, M, N, T, a };
//// [t1.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.M = exports.E = exports.C = exports.v = void 0;
+exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
exports.f = f;
exports.f1 = f;
exports.v1 = exports.v = 1;
@@ -55,6 +55,8 @@ var E;
var M;
(function (M) {
})(M || (exports.M1 = exports.M = M = {}));
+exports.a1 = exports.a = M.x;
+exports.a1 = exports.a;
//// [t2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff
index 47306e74bd..abd2951ede 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff
@@ -1,11 +1,7 @@
--- old.exportsAndImports3.js
+++ new.exportsAndImports3.js
-@@= skipped -35, +35 lines =@@
- //// [t1.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
-+exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.M = exports.E = exports.C = exports.v = void 0;
+@@= skipped -38, +38 lines =@@
+ exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
exports.f = f;
exports.f1 = f;
-exports.v = 1;
@@ -13,12 +9,13 @@
exports.v1 = exports.v;
function f() { }
class C {
-@@= skipped -19, +19 lines =@@
+@@= skipped -16, +16 lines =@@
var M;
(function (M) {
})(M || (exports.M1 = exports.M = M = {}));
-exports.a = M.x;
--exports.a1 = exports.a;
++exports.a1 = exports.a = M.x;
+ exports.a1 = exports.a;
//// [t2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
diff --git a/testdata/baselines/reference/submodule/conformance/importEquals3.js b/testdata/baselines/reference/submodule/conformance/importEquals3.js
index 2ade6b267b..730b313bac 100644
--- a/testdata/baselines/reference/submodule/conformance/importEquals3.js
+++ b/testdata/baselines/reference/submodule/conformance/importEquals3.js
@@ -31,6 +31,8 @@ exports.A = A;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.x = exports.A = void 0;
+var A = a.A; // Error
+exports.A = A;
const x = 0;
exports.x = x;
//// [c.js]
@@ -70,4 +72,5 @@ var __importStar = (this && this.__importStar) || (function () {
})();
Object.defineProperty(exports, "__esModule", { value: true });
const b = __importStar(require("./b"));
+var x = b.x;
console.log(x);
diff --git a/testdata/baselines/reference/submodule/conformance/importEquals3.js.diff b/testdata/baselines/reference/submodule/conformance/importEquals3.js.diff
deleted file mode 100644
index b1a31fe254..0000000000
--- a/testdata/baselines/reference/submodule/conformance/importEquals3.js.diff
+++ /dev/null
@@ -1,17 +0,0 @@
---- old.importEquals3.js
-+++ new.importEquals3.js
-@@= skipped -30, +30 lines =@@
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.x = exports.A = void 0;
--var A = a.A; // Error
--exports.A = A;
- const x = 0;
- exports.x = x;
- //// [c.js]
-@@= skipped -41, +39 lines =@@
- })();
- Object.defineProperty(exports, "__esModule", { value: true });
- const b = __importStar(require("./b"));
--var x = b.x;
- console.log(x);
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/parser519458.js b/testdata/baselines/reference/submodule/conformance/parser519458.js
index 4b936b916a..294cb8c5cb 100644
--- a/testdata/baselines/reference/submodule/conformance/parser519458.js
+++ b/testdata/baselines/reference/submodule/conformance/parser519458.js
@@ -5,5 +5,6 @@ import rect = module("rect"); var bar = new rect.Rect();
//// [parser519458.js]
+var rect = module;
("rect");
var bar = new rect.Rect();
diff --git a/testdata/baselines/reference/submodule/conformance/parser519458.js.diff b/testdata/baselines/reference/submodule/conformance/parser519458.js.diff
deleted file mode 100644
index be617b7826..0000000000
--- a/testdata/baselines/reference/submodule/conformance/parser519458.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.parser519458.js
-+++ new.parser519458.js
-@@= skipped -4, +4 lines =@@
-
-
- //// [parser519458.js]
--var rect = module;
- ("rect");
- var bar = new rect.Rect();
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js b/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js
index bfd7e770cc..96cd02fc12 100644
--- a/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js
+++ b/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js
@@ -25,4 +25,6 @@ const test2 = mod2; // Possible false positive instantiation, but ok
//// [reExportAliasMakesInstantiated.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
+exports.test1 = void 0;
+exports.test1 = pack2.test1;
const test2 = mod2; // Possible false positive instantiation, but ok
diff --git a/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js.diff b/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js.diff
deleted file mode 100644
index 8edac48605..0000000000
--- a/testdata/baselines/reference/submodule/conformance/reExportAliasMakesInstantiated.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.reExportAliasMakesInstantiated.js
-+++ new.reExportAliasMakesInstantiated.js
-@@= skipped -24, +24 lines =@@
- //// [reExportAliasMakesInstantiated.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.test1 = void 0;
--exports.test1 = pack2.test1;
- const test2 = mod2; // Possible false positive instantiation, but ok
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js
index 8e1e0687a0..182714041c 100644
--- a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js
+++ b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js
@@ -56,7 +56,7 @@ export var r13: typeof foo;
//// [typeofAnExportedType.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
-exports.r13 = exports.r12 = exports.r11 = exports.r10 = exports.E = exports.r9 = exports.r8 = exports.r7 = exports.r6 = exports.M = exports.r5 = exports.i = exports.r4b = exports.r4 = exports.r3 = exports.c = exports.C = exports.r2 = exports.y = exports.r1 = exports.x = void 0;
+exports.r13 = exports.r12 = exports.r11 = exports.r10 = exports.E = exports.r9 = exports.r8 = exports.Z = exports.r7 = exports.r6 = exports.M = exports.r5 = exports.i = exports.r4b = exports.r4 = exports.r3 = exports.c = exports.C = exports.r2 = exports.y = exports.r1 = exports.x = void 0;
exports.foo = foo;
exports.x = 1;
exports.y = { foo: '' };
@@ -74,6 +74,7 @@ var M;
}
M.C = C;
})(M || (exports.M = M = {}));
+exports.Z = M;
var E;
(function (E) {
E[E["A"] = 0] = "A";
diff --git a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js.diff b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js.diff
index 73a5210d65..44a249f586 100644
--- a/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/typeofAnExportedType.js.diff
@@ -1,12 +1,6 @@
--- old.typeofAnExportedType.js
+++ new.typeofAnExportedType.js
-@@= skipped -55, +55 lines =@@
- //// [typeofAnExportedType.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
--exports.r13 = exports.r12 = exports.r11 = exports.r10 = exports.E = exports.r9 = exports.r8 = exports.Z = exports.r7 = exports.r6 = exports.M = exports.r5 = exports.i = exports.r4b = exports.r4 = exports.r3 = exports.c = exports.C = exports.r2 = exports.y = exports.r1 = exports.x = void 0;
-+exports.r13 = exports.r12 = exports.r11 = exports.r10 = exports.E = exports.r9 = exports.r8 = exports.r7 = exports.r6 = exports.M = exports.r5 = exports.i = exports.r4b = exports.r4 = exports.r3 = exports.c = exports.C = exports.r2 = exports.y = exports.r1 = exports.x = void 0;
- exports.foo = foo;
+@@= skipped -60, +60 lines =@@
exports.x = 1;
exports.y = { foo: '' };
class C {
@@ -14,7 +8,7 @@
}
exports.C = C;
var c2;
-@@= skipped -13, +14 lines =@@
+@@= skipped -8, +9 lines =@@
(function (M) {
M.foo = '';
class C {
@@ -22,11 +16,7 @@
}
M.C = C;
})(M || (exports.M = M = {}));
--exports.Z = M;
- var E;
- (function (E) {
- E[E["A"] = 0] = "A";
-@@= skipped -12, +12 lines =@@
+@@= skipped -12, +13 lines =@@
(function (foo) {
foo.y = 1;
class C {
From c68252aac003e8baec5b96fb3cdc40185b6a3055 Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 27 Oct 2025 20:10:23 -0700
Subject: [PATCH 2/4] Fix IsTopLevelValueImportEqualsWithEntityName
---
internal/checker/emitresolver.go | 2 +-
.../tstransforms/importelision.go | 12 ++++++++--
.../reference/submodule/compiler/aliasBug.js | 1 +
.../submodule/compiler/aliasBug.js.diff | 10 ---------
.../submodule/compiler/aliasErrors.js | 4 ++++
.../submodule/compiler/aliasErrors.js.diff | 17 --------------
...collisionThisExpressionAndAliasInGlobal.js | 1 +
...sionThisExpressionAndAliasInGlobal.js.diff | 7 ------
.../compiler/duplicateVarAndImport2.js | 1 +
.../compiler/duplicateVarAndImport2.js.diff | 7 ------
.../duplicateVarsAcrossFileBoundaries.js | 1 +
.../duplicateVarsAcrossFileBoundaries.js.diff | 10 ---------
.../submodule/compiler/erasableSyntaxOnly.js | 1 +
.../compiler/erasableSyntaxOnly.js.diff | 9 +-------
.../errorForUsingPropertyOfTypeAsType01.js | 1 +
...rrorForUsingPropertyOfTypeAsType01.js.diff | 7 +-----
.../importAndVariableDeclarationConflict1.js | 1 +
...ortAndVariableDeclarationConflict1.js.diff | 8 -------
.../importAndVariableDeclarationConflict2.js | 1 +
...ortAndVariableDeclarationConflict2.js.diff | 10 ---------
.../importAndVariableDeclarationConflict3.js | 2 ++
...ortAndVariableDeclarationConflict3.js.diff | 8 -------
.../importAndVariableDeclarationConflict4.js | 1 +
...ortAndVariableDeclarationConflict4.js.diff | 7 ------
.../compiler/importEqualsError45874.js | 1 +
.../compiler/importEqualsError45874.js.diff | 9 --------
.../submodule/compiler/jsdocInTypeScript.js | 2 ++
.../compiler/jsdocInTypeScript.js.diff | 11 +---------
.../compiler/moduleAliasInterface.js | 1 +
.../compiler/moduleAliasInterface.js.diff | 10 +--------
.../conformance/importAliasIdentifiers.js | 3 +++
.../importAliasIdentifiers.js.diff | 22 ++-----------------
.../invalidImportAliasIdentifiers.js | 4 ++++
.../invalidImportAliasIdentifiers.js.diff | 16 ++++----------
.../conformance/parserImportDeclaration1.js | 1 +
.../parserImportDeclaration1.js.diff | 7 ------
.../conformance/scannerImportDeclaration1.js | 1 +
.../scannerImportDeclaration1.js.diff | 7 ------
.../topLevelAwait.2(module=es2022).js | 2 ++
.../topLevelAwait.2(module=es2022).js.diff | 8 -------
.../topLevelAwait.2(module=esnext).js | 2 ++
.../topLevelAwait.2(module=esnext).js.diff | 8 -------
42 files changed, 53 insertions(+), 191 deletions(-)
delete mode 100644 testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js.diff
delete mode 100644 testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js.diff
delete mode 100644 testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js.diff
diff --git a/internal/checker/emitresolver.go b/internal/checker/emitresolver.go
index 14d9ecd2bc..f911eec7ac 100644
--- a/internal/checker/emitresolver.go
+++ b/internal/checker/emitresolver.go
@@ -762,7 +762,7 @@ func (r *emitResolver) IsTopLevelValueImportEqualsWithEntityName(node *ast.Node)
return false
}
if ast.IsImportEqualsDeclaration(node) &&
- (ast.NodeIsMissing(node.AsImportEqualsDeclaration().ModuleReference) || node.AsImportEqualsDeclaration().ModuleReference.Kind != ast.KindExternalModuleReference) {
+ (ast.NodeIsMissing(node.AsImportEqualsDeclaration().ModuleReference) || node.AsImportEqualsDeclaration().ModuleReference.Kind == ast.KindExternalModuleReference) {
return false
}
diff --git a/internal/transformers/tstransforms/importelision.go b/internal/transformers/tstransforms/importelision.go
index 936d7740bb..7b23343d4a 100644
--- a/internal/transformers/tstransforms/importelision.go
+++ b/internal/transformers/tstransforms/importelision.go
@@ -27,8 +27,16 @@ func NewImportElisionTransformer(opt *transformers.TransformOptions) *transforme
func (tx *ImportElisionTransformer) visit(node *ast.Node) *ast.Node {
switch node.Kind {
case ast.KindImportEqualsDeclaration:
- if !tx.isElisionBlocked(node) && !tx.shouldEmitImportEqualsDeclaration(node.AsImportEqualsDeclaration()) {
- return nil
+ if !tx.isElisionBlocked(node) {
+ if ast.IsExternalModuleImportEqualsDeclaration(node) {
+ if !tx.shouldEmitAliasDeclaration(node) {
+ return nil
+ }
+ } else {
+ if !tx.shouldEmitImportEqualsDeclaration(node.AsImportEqualsDeclaration()) {
+ return nil
+ }
+ }
}
return tx.Visitor().VisitEachChild(node)
case ast.KindImportDeclaration:
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js b/testdata/baselines/reference/submodule/compiler/aliasBug.js
index c08f24c144..705e88a34a 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasBug.js
@@ -38,6 +38,7 @@ var foo;
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
var provide = foo;
+var booz = foo.bar.baz;
var p = new provide.Provide();
function use() {
var p1; // error here, but should be okay
diff --git a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff b/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
deleted file mode 100644
index 7817503bae..0000000000
--- a/testdata/baselines/reference/submodule/compiler/aliasBug.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.aliasBug.js
-+++ new.aliasBug.js
-@@= skipped -37, +37 lines =@@
- })(bar = foo.bar || (foo.bar = {}));
- })(foo || (foo = {}));
- var provide = foo;
--var booz = foo.bar.baz;
- var p = new provide.Provide();
- function use() {
- var p1; // error here, but should be okay
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js b/testdata/baselines/reference/submodule/compiler/aliasErrors.js
index 028ff63e9e..b8c6ba5271 100644
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js
+++ b/testdata/baselines/reference/submodule/compiler/aliasErrors.js
@@ -49,10 +49,14 @@ var foo;
})(bar = foo.bar || (foo.bar = {}));
})(foo || (foo = {}));
var provide = foo;
+var booz = foo.bar.baz;
var beez = foo.bar;
+var m = no;
+var m2 = no.mod;
5;
"s";
null;
+var r = undefined;
var p = new provide.Provide();
function use() {
beez.baz.boo;
diff --git a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff b/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
deleted file mode 100644
index 474c41c08b..0000000000
--- a/testdata/baselines/reference/submodule/compiler/aliasErrors.js.diff
+++ /dev/null
@@ -1,17 +0,0 @@
---- old.aliasErrors.js
-+++ new.aliasErrors.js
-@@= skipped -48, +48 lines =@@
- })(bar = foo.bar || (foo.bar = {}));
- })(foo || (foo = {}));
- var provide = foo;
--var booz = foo.bar.baz;
- var beez = foo.bar;
--var m = no;
--var m2 = no.mod;
- 5;
- "s";
- null;
--var r = undefined;
- var p = new provide.Provide();
- function use() {
- beez.baz.boo;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js
index 59d4def4b8..7af0e409bd 100644
--- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js
+++ b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js
@@ -13,3 +13,4 @@ var a;
a.b = 10;
})(a || (a = {}));
var f = () => this;
+var _this = a; // Error
diff --git a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff b/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff
deleted file mode 100644
index 484d9e87ec..0000000000
--- a/testdata/baselines/reference/submodule/compiler/collisionThisExpressionAndAliasInGlobal.js.diff
+++ /dev/null
@@ -1,7 +0,0 @@
---- old.collisionThisExpressionAndAliasInGlobal.js
-+++ new.collisionThisExpressionAndAliasInGlobal.js
-@@= skipped -12, +12 lines =@@
- a.b = 10;
- })(a || (a = {}));
- var f = () => this;
--var _this = a; // Error
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js
index 61391fad5a..b27003792b 100644
--- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js
+++ b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js
@@ -13,3 +13,4 @@ var M;
(function (M) {
M.x = 1;
})(M || (M = {}));
+var a = M;
diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js.diff
deleted file mode 100644
index 2749263768..0000000000
--- a/testdata/baselines/reference/submodule/compiler/duplicateVarAndImport2.js.diff
+++ /dev/null
@@ -1,7 +0,0 @@
---- old.duplicateVarAndImport2.js
-+++ new.duplicateVarAndImport2.js
-@@= skipped -12, +12 lines =@@
- (function (M) {
- M.x = 1;
- })(M || (M = {}));
--var a = M;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js
index f26b866991..4e60fa535b 100644
--- a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js
+++ b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js
@@ -43,6 +43,7 @@ var x = 0;
var y = "";
var z = 0;
//// [duplicateVarsAcrossFileBoundaries_4.js]
+var p = P;
var q;
//// [duplicateVarsAcrossFileBoundaries_5.js]
var p;
diff --git a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js.diff b/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js.diff
deleted file mode 100644
index 961bffe8b8..0000000000
--- a/testdata/baselines/reference/submodule/compiler/duplicateVarsAcrossFileBoundaries.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.duplicateVarsAcrossFileBoundaries.js
-+++ new.duplicateVarsAcrossFileBoundaries.js
-@@= skipped -42, +42 lines =@@
- var y = "";
- var z = 0;
- //// [duplicateVarsAcrossFileBoundaries_4.js]
--var p = P;
- var q;
- //// [duplicateVarsAcrossFileBoundaries_5.js]
- var p;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js
index c71bd4d2a8..f06abb56d9 100644
--- a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js
+++ b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js
@@ -139,6 +139,7 @@ var NotLegalEnum;
(function (NotLegalEnum) {
NotLegalEnum[NotLegalEnum["B"] = 1] = "B";
})(NotLegalEnum || (NotLegalEnum = {}));
+var NoGoodAlias = NotLegalEnum.B;
// No errors after this point
class MyClassOk {
// Not a parameter property, ok
diff --git a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff
index 96cc7ca90d..b4aa20aa39 100644
--- a/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/erasableSyntaxOnly.js.diff
@@ -8,14 +8,7 @@
// No parameter properties
constructor(foo) {
this.foo = foo;
-@@= skipped -25, +26 lines =@@
- (function (NotLegalEnum) {
- NotLegalEnum[NotLegalEnum["B"] = 1] = "B";
- })(NotLegalEnum || (NotLegalEnum = {}));
--var NoGoodAlias = NotLegalEnum.B;
- // No errors after this point
- class MyClassOk {
- // Not a parameter property, ok
+@@= skipped -32, +33 lines =@@
constructor(foo) { }
}
// Not erasable
diff --git a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js
index e96e2e5bcf..bc3c01d610 100644
--- a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js
+++ b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js
@@ -76,3 +76,4 @@ var Test5;
var x = "";
var y = "";
})(Test5 || (Test5 = {}));
+var lol = Test5.Foo.;
diff --git a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff
index a2653054c6..20e6f262e7 100644
--- a/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/errorForUsingPropertyOfTypeAsType01.js.diff
@@ -7,9 +7,4 @@
+ bar;
}
Test2.Foo = Foo;
- var x = "";
-@@= skipped -20, +21 lines =@@
- var x = "";
- var y = "";
- })(Test5 || (Test5 = {}));
--var lol = Test5.Foo.;
\ No newline at end of file
+ var x = "";
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js
index fd5ae88222..8d10b64084 100644
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js
+++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js
@@ -14,4 +14,5 @@ var m;
(function (m_1) {
m_1.m = '';
})(m || (m = {}));
+var x = m.m;
var x = '';
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js.diff b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js.diff
deleted file mode 100644
index 8a7b16b462..0000000000
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict1.js.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.importAndVariableDeclarationConflict1.js
-+++ new.importAndVariableDeclarationConflict1.js
-@@= skipped -13, +13 lines =@@
- (function (m_1) {
- m_1.m = '';
- })(m || (m = {}));
--var x = m.m;
- var x = '';
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js
index 77267e73bd..5e2c9df7d5 100644
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js
+++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js
@@ -18,6 +18,7 @@ var m;
(function (m_1) {
m_1.m = '';
})(m || (m = {}));
+var x = m.m;
class C {
foo() {
var x = '';
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff
deleted file mode 100644
index 13ec517e67..0000000000
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict2.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.importAndVariableDeclarationConflict2.js
-+++ new.importAndVariableDeclarationConflict2.js
-@@= skipped -17, +17 lines =@@
- (function (m_1) {
- m_1.m = '';
- })(m || (m = {}));
--var x = m.m;
- class C {
- foo() {
- var x = '';
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js
index 2850f1e4f3..6f48077d68 100644
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js
+++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js
@@ -14,3 +14,5 @@ var m;
(function (m_1) {
m_1.m = '';
})(m || (m = {}));
+var x = m.m;
+var x = m.m;
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js.diff b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js.diff
deleted file mode 100644
index ea09adefdf..0000000000
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict3.js.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.importAndVariableDeclarationConflict3.js
-+++ new.importAndVariableDeclarationConflict3.js
-@@= skipped -13, +13 lines =@@
- (function (m_1) {
- m_1.m = '';
- })(m || (m = {}));
--var x = m.m;
--var x = m.m;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js
index 5502f2132c..0467a55891 100644
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js
+++ b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js
@@ -15,3 +15,4 @@ var m;
m_1.m = '';
})(m || (m = {}));
var x = '';
+var x = m.m;
diff --git a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js.diff b/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js.diff
deleted file mode 100644
index a653d32778..0000000000
--- a/testdata/baselines/reference/submodule/compiler/importAndVariableDeclarationConflict4.js.diff
+++ /dev/null
@@ -1,7 +0,0 @@
---- old.importAndVariableDeclarationConflict4.js
-+++ new.importAndVariableDeclarationConflict4.js
-@@= skipped -14, +14 lines =@@
- m_1.m = '';
- })(m || (m = {}));
- var x = '';
--var x = m.m;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js b/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js
index 641699eb75..04bd76a6f2 100644
--- a/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js
+++ b/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js
@@ -16,5 +16,6 @@ var globals;
(function (globals) {
globals.Bar = {};
})(globals || (globals = {}));
+var Foo = globals.toString.Blah;
//// [index.js]
const Foo = {};
diff --git a/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff b/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff
deleted file mode 100644
index 40839fa8be..0000000000
--- a/testdata/baselines/reference/submodule/compiler/importEqualsError45874.js.diff
+++ /dev/null
@@ -1,9 +0,0 @@
---- old.importEqualsError45874.js
-+++ new.importEqualsError45874.js
-@@= skipped -15, +15 lines =@@
- (function (globals) {
- globals.Bar = {};
- })(globals || (globals = {}));
--var Foo = globals.toString.Blah;
- //// [index.js]
- const Foo = {};
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js b/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js
index b4585c5b55..9a78ba462c 100644
--- a/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js
+++ b/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js
@@ -113,6 +113,8 @@ z.x = 1; // Error
/** @template T */
function tem(t) { return {}; }
let i; // Should succeed thanks to type parameter default
+/** @typedef {string} N.Str */
+var M = N; // Error: @typedef does not create namespaces in TypeScript code.
// Not legal JSDoc, but that shouldn't matter in TypeScript.
/**
* @type {{foo: (function(string, string): string)}}
diff --git a/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff b/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff
index fb618d4330..20435e0175 100644
--- a/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/jsdocInTypeScript.js.diff
@@ -7,13 +7,4 @@
+ prop;
}
x.prop;
- // @param type has no effect.
-@@= skipped -18, +19 lines =@@
- /** @template T */
- function tem(t) { return {}; }
- let i; // Should succeed thanks to type parameter default
--/** @typedef {string} N.Str */
--var M = N; // Error: @typedef does not create namespaces in TypeScript code.
- // Not legal JSDoc, but that shouldn't matter in TypeScript.
- /**
- * @type {{foo: (function(string, string): string)}}
\ No newline at end of file
+ // @param type has no effect.
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js b/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js
index 7e71a724b6..e627e0c176 100644
--- a/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js
+++ b/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js
@@ -76,6 +76,7 @@ var editor;
}
}
})(editor || (editor = {}));
+var modesOuter = _modes;
var editor2;
(function (editor2) {
var i;
diff --git a/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js.diff b/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js.diff
index 4d99de66ca..453e45fafe 100644
--- a/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js.diff
+++ b/testdata/baselines/reference/submodule/compiler/moduleAliasInterface.js.diff
@@ -8,15 +8,7 @@
var i;
// If you just use p1:modes, the compiler accepts it - should be an error
class Bug {
-@@= skipped -8, +9 lines =@@
- }
- }
- })(editor || (editor = {}));
--var modesOuter = _modes;
- var editor2;
- (function (editor2) {
- var i;
-@@= skipped -25, +24 lines =@@
+@@= skipped -33, +34 lines =@@
})(A1 || (A1 = {}));
var B1;
(function (B1) {
diff --git a/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js b/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js
index 29484f769f..92836ad63b 100644
--- a/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js
+++ b/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js
@@ -61,6 +61,7 @@ var moduleA;
}
moduleA.Point = Point;
})(moduleA || (moduleA = {}));
+var alias = moduleA;
var p;
var p;
var p;
@@ -70,6 +71,7 @@ class clodule {
(function (clodule) {
var Point = { x: 0, y: 0 };
})(clodule || (clodule = {}));
+var clolias = clodule;
var p;
var p;
var p;
@@ -79,6 +81,7 @@ function fundule() {
(function (fundule) {
var Point = { x: 0, y: 0 };
})(fundule || (fundule = {}));
+var funlias = fundule;
var p;
var p;
var p;
diff --git a/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js.diff b/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js.diff
index 62c5dff1a0..9ecce90620 100644
--- a/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/importAliasIdentifiers.js.diff
@@ -9,29 +9,11 @@
constructor(x, y) {
this.x = x;
this.y = y;
-@@= skipped -7, +9 lines =@@
- }
- moduleA.Point = Point;
- })(moduleA || (moduleA = {}));
--var alias = moduleA;
- var p;
+@@= skipped -12, +14 lines =@@
var p;
var p;
class clodule {
+ name;
}
(function (clodule) {
- var Point = { x: 0, y: 0 };
- })(clodule || (clodule = {}));
--var clolias = clodule;
- var p;
- var p;
- var p;
-@@= skipped -19, +18 lines =@@
- (function (fundule) {
- var Point = { x: 0, y: 0 };
- })(fundule || (fundule = {}));
--var funlias = fundule;
- var p;
- var p;
- var p;
\ No newline at end of file
+ var Point = { x: 0, y: 0 };
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js b/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js
index 98455572c8..4f5add96e2 100644
--- a/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js
+++ b/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js
@@ -29,11 +29,15 @@ import i = I;
//// [invalidImportAliasIdentifiers.js]
// none of these should work, since non are actually modules
var V = 12;
+var v = V;
class C {
name;
}
+var c = C;
var E;
(function (E) {
E[E["Red"] = 0] = "Red";
E[E["Blue"] = 1] = "Blue";
})(E || (E = {}));
+var e = E;
+var i = I;
diff --git a/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js.diff b/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js.diff
index e791c378d6..fcc5c53993 100644
--- a/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/invalidImportAliasIdentifiers.js.diff
@@ -1,18 +1,10 @@
--- old.invalidImportAliasIdentifiers.js
+++ new.invalidImportAliasIdentifiers.js
-@@= skipped -28, +28 lines =@@
- //// [invalidImportAliasIdentifiers.js]
- // none of these should work, since non are actually modules
+@@= skipped -30, +30 lines =@@
var V = 12;
--var v = V;
+ var v = V;
class C {
+ name;
}
--var c = C;
- var E;
- (function (E) {
- E[E["Red"] = 0] = "Red";
- E[E["Blue"] = 1] = "Blue";
- })(E || (E = {}));
--var e = E;
--var i = I;
\ No newline at end of file
+ var c = C;
+ var E;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js b/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js
index 850c8fea6d..e4049e6e4c 100644
--- a/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js
+++ b/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js
@@ -4,3 +4,4 @@
import TypeScript = TypeScriptServices.TypeScript;
//// [parserImportDeclaration1.js]
+var TypeScript = TypeScriptServices.TypeScript;
diff --git a/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js.diff b/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js.diff
deleted file mode 100644
index 53108558f9..0000000000
--- a/testdata/baselines/reference/submodule/conformance/parserImportDeclaration1.js.diff
+++ /dev/null
@@ -1,7 +0,0 @@
---- old.parserImportDeclaration1.js
-+++ new.parserImportDeclaration1.js
-@@= skipped -3, +3 lines =@@
- import TypeScript = TypeScriptServices.TypeScript;
-
- //// [parserImportDeclaration1.js]
--var TypeScript = TypeScriptServices.TypeScript;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js b/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js
index 66470463d6..dbd642df90 100644
--- a/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js
+++ b/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js
@@ -4,3 +4,4 @@
import TypeScript = TypeScriptServices.TypeScript;
//// [scannerImportDeclaration1.js]
+var TypeScript = TypeScriptServices.TypeScript;
diff --git a/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js.diff b/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js.diff
deleted file mode 100644
index 35e56c19ae..0000000000
--- a/testdata/baselines/reference/submodule/conformance/scannerImportDeclaration1.js.diff
+++ /dev/null
@@ -1,7 +0,0 @@
---- old.scannerImportDeclaration1.js
-+++ new.scannerImportDeclaration1.js
-@@= skipped -3, +3 lines =@@
- import TypeScript = TypeScriptServices.TypeScript;
-
- //// [scannerImportDeclaration1.js]
--var TypeScript = TypeScriptServices.TypeScript;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js b/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js
index fc50a609cc..1911b78260 100644
--- a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js
+++ b/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js
@@ -8,3 +8,5 @@ import await = foo.await;
//// [topLevelAwait.2.js]
+// await allowed in import=namespace when not a module
+var await = foo.await;
diff --git a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js.diff b/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js.diff
deleted file mode 100644
index 8347736b33..0000000000
--- a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=es2022).js.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.topLevelAwait.2(module=es2022).js
-+++ new.topLevelAwait.2(module=es2022).js
-@@= skipped -7, +7 lines =@@
-
-
- //// [topLevelAwait.2.js]
--// await allowed in import=namespace when not a module
--var await = foo.await;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js b/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js
index fc50a609cc..1911b78260 100644
--- a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js
+++ b/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js
@@ -8,3 +8,5 @@ import await = foo.await;
//// [topLevelAwait.2.js]
+// await allowed in import=namespace when not a module
+var await = foo.await;
diff --git a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js.diff b/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js.diff
deleted file mode 100644
index 4c9e1514ff..0000000000
--- a/testdata/baselines/reference/submodule/conformance/topLevelAwait.2(module=esnext).js.diff
+++ /dev/null
@@ -1,8 +0,0 @@
---- old.topLevelAwait.2(module=esnext).js
-+++ new.topLevelAwait.2(module=esnext).js
-@@= skipped -7, +7 lines =@@
-
-
- //// [topLevelAwait.2.js]
--// await allowed in import=namespace when not a module
--var await = foo.await;
\ No newline at end of file
From a9582831de003e1591fccfe124b8575db8f89bca Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 27 Oct 2025 20:52:11 -0700
Subject: [PATCH 3/4] Fix binder for const enums
---
internal/binder/binder.go | 7 +++++--
.../reference/submodule/compiler/constEnums.js | 1 -
.../reference/submodule/compiler/constEnums.js.diff | 10 ----------
3 files changed, 5 insertions(+), 13 deletions(-)
delete mode 100644 testdata/baselines/reference/submodule/compiler/constEnums.js.diff
diff --git a/internal/binder/binder.go b/internal/binder/binder.go
index 1824ffcac1..5d28ac2cfa 100644
--- a/internal/binder/binder.go
+++ b/internal/binder/binder.go
@@ -794,8 +794,11 @@ func (b *Binder) bindModuleDeclaration(node *ast.Node) {
state := b.declareModuleSymbol(node)
if state != ast.ModuleInstanceStateNonInstantiated {
symbol := node.AsModuleDeclaration().Symbol
- if symbol.Flags&(ast.SymbolFlagsFunction|ast.SymbolFlagsClass|ast.SymbolFlagsRegularEnum) != 0 || state != ast.ModuleInstanceStateConstEnumOnly {
- // if module was already merged with some function, class or non-const enum, treat it as non-const-enum-only
+ if (symbol.Flags&(ast.SymbolFlagsFunction|ast.SymbolFlagsClass|ast.SymbolFlagsRegularEnum) == 0) &&
+ state == ast.ModuleInstanceStateConstEnumOnly &&
+ symbol.Flags&ast.SymbolFlagsConstEnumOnlyModule == 0 {
+ symbol.Flags |= ast.SymbolFlagsConstEnumOnlyModule
+ } else {
symbol.Flags &^= ast.SymbolFlagsConstEnumOnlyModule
}
}
diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.js b/testdata/baselines/reference/submodule/compiler/constEnums.js
index 8d10e3cead..30c1e17bf8 100644
--- a/testdata/baselines/reference/submodule/compiler/constEnums.js
+++ b/testdata/baselines/reference/submodule/compiler/constEnums.js
@@ -192,7 +192,6 @@ var A2;
})(C = B.C || (B.C = {}));
})(B = A2.B || (A2.B = {}));
})(A2 || (A2 = {}));
-var I1 = A1.B;
var I2 = A2.B;
function foo0(e) {
if (e === 1 /* I.V1 */) {
diff --git a/testdata/baselines/reference/submodule/compiler/constEnums.js.diff b/testdata/baselines/reference/submodule/compiler/constEnums.js.diff
deleted file mode 100644
index 9b426c0601..0000000000
--- a/testdata/baselines/reference/submodule/compiler/constEnums.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.constEnums.js
-+++ new.constEnums.js
-@@= skipped -191, +191 lines =@@
- })(C = B.C || (B.C = {}));
- })(B = A2.B || (A2.B = {}));
- })(A2 || (A2 = {}));
-+var I1 = A1.B;
- var I2 = A2.B;
- function foo0(e) {
- if (e === 1 /* I.V1 */) {
\ No newline at end of file
From 982e9061db2c11241cf67869e79d73bd03661902 Mon Sep 17 00:00:00 2001
From: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
Date: Mon, 27 Oct 2025 22:48:42 -0700
Subject: [PATCH 4/4] Change some more but I am less sure about this
---
.../moduletransforms/commonjsmodule.go | 22 +++
.../reference/compiler/exportDestructuring.js | 13 ++
.../compiler/exportDestructuring.symbols | 11 ++
.../compiler/exportDestructuring.types | 14 ++
.../compiler/importDeclWithClassModifiers.js | 2 +-
.../importDeclWithClassModifiers.js.diff | 10 --
.../unicodeEscapesInNames01(target=es5).js | 8 +-
...nicodeEscapesInNames01(target=es5).js.diff | 35 +----
...unicodeEscapesInNames01(target=es5).js.map | 16 +-
...deEscapesInNames01(target=es5).js.map.diff | 16 +-
...EscapesInNames01(target=es5).sourcemap.txt | 96 ++++++------
...esInNames01(target=es5).sourcemap.txt.diff | 140 +-----------------
.../conformance/exportsAndImports3-es6.js | 4 +-
.../exportsAndImports3-es6.js.diff | 18 +--
.../conformance/exportsAndImports3.js | 4 +-
.../conformance/exportsAndImports3.js.diff | 18 +--
.../cases/compiler/exportDestructuring.ts | 6 +
17 files changed, 144 insertions(+), 289 deletions(-)
create mode 100644 testdata/baselines/reference/compiler/exportDestructuring.js
create mode 100644 testdata/baselines/reference/compiler/exportDestructuring.symbols
create mode 100644 testdata/baselines/reference/compiler/exportDestructuring.types
delete mode 100644 testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff
create mode 100644 testdata/tests/cases/compiler/exportDestructuring.ts
diff --git a/internal/transformers/moduletransforms/commonjsmodule.go b/internal/transformers/moduletransforms/commonjsmodule.go
index 8f39ecdd78..dc3f318c78 100644
--- a/internal/transformers/moduletransforms/commonjsmodule.go
+++ b/internal/transformers/moduletransforms/commonjsmodule.go
@@ -1080,7 +1080,14 @@ func (tx *CommonJSModuleTransformer) visitTopLevelVariableStatement(node *ast.Va
propertyAccess,
v.Name().Clone(tx.Factory()),
))
+ } else if ast.IsIdentifier(v.Name()) {
+ expression := tx.transformInitializedVariable(v)
+ if expression != nil {
+ pushExpression(tx.Visitor().VisitNode(expression))
+ }
} else {
+ // For binding patterns, we can't do exports.{pattern} = value
+ // Just emit the assignment and let appendExportsOfVariableStatement handle the exports
expression := transformers.ConvertVariableDeclarationToAssignmentExpression(tx.EmitContext(), v)
if expression != nil {
pushExpression(tx.Visitor().VisitNode(expression))
@@ -1096,6 +1103,21 @@ func (tx *CommonJSModuleTransformer) visitTopLevelVariableStatement(node *ast.Va
return tx.visitTopLevelNestedVariableStatement(node)
}
+func (tx *CommonJSModuleTransformer) transformInitializedVariable(node *ast.VariableDeclaration) *ast.Expression {
+ if node.Initializer == nil {
+ return nil
+ }
+ name := node.Name()
+ propertyAccess := tx.Factory().NewPropertyAccessExpression(
+ tx.Factory().NewIdentifier("exports"),
+ nil, /*questionDotToken*/
+ name,
+ ast.NodeFlagsNone,
+ )
+ tx.EmitContext().AssignCommentAndSourceMapRanges(propertyAccess, name)
+ return tx.Factory().NewAssignmentExpression(propertyAccess, node.Initializer)
+}
+
// Visits a top-level nested variable statement as it may contain `var` declarations that are hoisted and may still be
// exported with `export {}`.
func (tx *CommonJSModuleTransformer) visitTopLevelNestedVariableStatement(node *ast.VariableStatement) *ast.Node {
diff --git a/testdata/baselines/reference/compiler/exportDestructuring.js b/testdata/baselines/reference/compiler/exportDestructuring.js
new file mode 100644
index 0000000000..33d6858ab0
--- /dev/null
+++ b/testdata/baselines/reference/compiler/exportDestructuring.js
@@ -0,0 +1,13 @@
+//// [tests/cases/compiler/exportDestructuring.ts] ////
+
+//// [exportDestructuring.ts]
+const arr = [1, 2];
+export const [a, b] = arr;
+
+
+//// [exportDestructuring.js]
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.b = exports.a = void 0;
+const arr = [1, 2];
+[exports.a, exports.b] = arr;
diff --git a/testdata/baselines/reference/compiler/exportDestructuring.symbols b/testdata/baselines/reference/compiler/exportDestructuring.symbols
new file mode 100644
index 0000000000..4c0d010b3d
--- /dev/null
+++ b/testdata/baselines/reference/compiler/exportDestructuring.symbols
@@ -0,0 +1,11 @@
+//// [tests/cases/compiler/exportDestructuring.ts] ////
+
+=== exportDestructuring.ts ===
+const arr = [1, 2];
+>arr : Symbol(arr, Decl(exportDestructuring.ts, 0, 5))
+
+export const [a, b] = arr;
+>a : Symbol(a, Decl(exportDestructuring.ts, 1, 14))
+>b : Symbol(b, Decl(exportDestructuring.ts, 1, 16))
+>arr : Symbol(arr, Decl(exportDestructuring.ts, 0, 5))
+
diff --git a/testdata/baselines/reference/compiler/exportDestructuring.types b/testdata/baselines/reference/compiler/exportDestructuring.types
new file mode 100644
index 0000000000..1fc65436d6
--- /dev/null
+++ b/testdata/baselines/reference/compiler/exportDestructuring.types
@@ -0,0 +1,14 @@
+//// [tests/cases/compiler/exportDestructuring.ts] ////
+
+=== exportDestructuring.ts ===
+const arr = [1, 2];
+>arr : number[]
+>[1, 2] : number[]
+>1 : 1
+>2 : 2
+
+export const [a, b] = arr;
+>a : number
+>b : number
+>arr : number[]
+
diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js
index a7b29f9b7a..8225d825e9 100644
--- a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js
+++ b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js
@@ -16,6 +16,6 @@ var b: a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.c = exports.b = exports.a = void 0;
exports.a = x.c;
-b = x.c;
+exports.b = x.c;
exports.c = x.c;
var b;
diff --git a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff b/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff
deleted file mode 100644
index cbfcfb0d81..0000000000
--- a/testdata/baselines/reference/submodule/compiler/importDeclWithClassModifiers.js.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- old.importDeclWithClassModifiers.js
-+++ new.importDeclWithClassModifiers.js
-@@= skipped -15, +15 lines =@@
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.c = exports.b = exports.a = void 0;
- exports.a = x.c;
--exports.b = x.c;
-+b = x.c;
- exports.c = x.c;
- var b;
\ No newline at end of file
diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js
index 04a7ca363e..1c721f69c4 100644
--- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js
+++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js
@@ -125,28 +125,28 @@ export class PrivateIdentifierWithExtendedEscape2 {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.x = void 0;
-exports.x = 10;
+exports.\u0078 = 10;
exports.x++;
//# sourceMappingURL=identifierVariableWithEscape1.js.map
//// [identifierVariableWithEscape2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.xx = void 0;
-exports.xx = 10;
+exports.x\u0078 = 10;
exports.xx++;
//# sourceMappingURL=identifierVariableWithEscape2.js.map
//// [identifierVariableWithExtendedEscape1.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.x = void 0;
-exports.x = 10;
+exports.\u{78} = 10;
exports.x++;
//# sourceMappingURL=identifierVariableWithExtendedEscape1.js.map
//// [identifierVariableWithExtendedEscape2.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.xx = void 0;
-exports.xx = 10;
+exports.x\u{78} = 10;
exports.xx++;
//# sourceMappingURL=identifierVariableWithExtendedEscape2.js.map
//// [IdentifierNameWithEscape1.js]
diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.diff
index 036e7ffc1a..6042951c27 100644
--- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.diff
+++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.diff
@@ -1,39 +1,6 @@
--- old.unicodeEscapesInNames01(target=es5).js
+++ new.unicodeEscapesInNames01(target=es5).js
-@@= skipped -124, +124 lines =@@
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.x = void 0;
--exports.\u0078 = 10;
-+exports.x = 10;
- exports.x++;
- //# sourceMappingURL=identifierVariableWithEscape1.js.map
- //// [identifierVariableWithEscape2.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.xx = void 0;
--exports.x\u0078 = 10;
-+exports.xx = 10;
- exports.xx++;
- //# sourceMappingURL=identifierVariableWithEscape2.js.map
- //// [identifierVariableWithExtendedEscape1.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.x = void 0;
--exports.\u{78} = 10;
-+exports.x = 10;
- exports.x++;
- //# sourceMappingURL=identifierVariableWithExtendedEscape1.js.map
- //// [identifierVariableWithExtendedEscape2.js]
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- exports.xx = void 0;
--exports.x\u{78} = 10;
-+exports.xx = 10;
- exports.xx++;
- //# sourceMappingURL=identifierVariableWithExtendedEscape2.js.map
- //// [IdentifierNameWithEscape1.js]
-@@= skipped -29, +29 lines =@@
+@@= skipped -153, +153 lines =@@
Object.defineProperty(exports, "__esModule", { value: true });
exports.IdentifierNameWithEscape1 = void 0;
class IdentifierNameWithEscape1 {
diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map
index 0e13abbe71..42f428c2a9 100644
--- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map
+++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map
@@ -1,18 +1,18 @@
//// [identifierVariableWithEscape1.js.map]
-{"version":3,"file":"identifierVariableWithEscape1.js","sourceRoot":"","sources":["identifierVariableWithEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,CAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMueCA9IDEwOw0KZXhwb3J0cy54Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLENBQU0sR0FBRyxFQUFFLENBQUM7QUFDdkIsUUFBQSxDQUFDLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCBcdTAwNzggPSAxMDsKeCsrOwo=
+{"version":3,"file":"identifierVariableWithEscape1.js","sourceRoot":"","sources":["identifierVariableWithEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,MAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMuXHUwMDc4ID0gMTA7DQpleHBvcnRzLngrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFc2NhcGUxLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLE1BQU0sR0FBRyxFQUFFLENBQUM7QUFDdkIsUUFBQSxDQUFDLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCBcdTAwNzggPSAxMDsKeCsrOwo=
//// [identifierVariableWithEscape2.js.map]
-{"version":3,"file":"identifierVariableWithEscape2.js","sourceRoot":"","sources":["identifierVariableWithEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,EAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnh4ID0gMTA7DQpleHBvcnRzLnh4Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLEVBQU8sR0FBRyxFQUFFLENBQUM7QUFDeEIsUUFBQSxFQUFFLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCB4XHUwMDc4ID0gMTA7Cnh4Kys7Cg==
+{"version":3,"file":"identifierVariableWithEscape2.js","sourceRoot":"","sources":["identifierVariableWithEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,OAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnhcdTAwNzggPSAxMDsNCmV4cG9ydHMueHgrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFc2NhcGUyLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLE9BQU8sR0FBRyxFQUFFLENBQUM7QUFDeEIsUUFBQSxFQUFFLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCB4XHUwMDc4ID0gMTA7Cnh4Kys7Cg==
//// [identifierVariableWithExtendedEscape1.js.map]
-{"version":3,"file":"identifierVariableWithExtendedEscape1.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,CAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMueCA9IDEwOw0KZXhwb3J0cy54Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXh0ZW5kZWRFc2NhcGUxLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxDQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ3ZCLFFBQUEsQ0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCBcdXs3OH0gPSAxMDsKeCsrOwo=
+{"version":3,"file":"identifierVariableWithExtendedEscape1.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,MAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMuXHV7Nzh9ID0gMTA7DQpleHBvcnRzLngrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxNQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ3ZCLFFBQUEsQ0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCBcdXs3OH0gPSAxMDsKeCsrOwo=
//// [identifierVariableWithExtendedEscape2.js.map]
-{"version":3,"file":"identifierVariableWithExtendedEscape2.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,EAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnh4ID0gMTA7DQpleHBvcnRzLnh4Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXh0ZW5kZWRFc2NhcGUyLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxFQUFPLEdBQUcsRUFBRSxDQUFDO0FBQ3hCLFFBQUEsRUFBRSxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCB4XHV7Nzh9ID0gMTA7Cnh4Kys7Cg==
+{"version":3,"file":"identifierVariableWithExtendedEscape2.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,OAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnhcdXs3OH0gPSAxMDsNCmV4cG9ydHMueHgrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxPQUFPLEdBQUcsRUFBRSxDQUFDO0FBQ3hCLFFBQUEsRUFBRSxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCB4XHV7Nzh9ID0gMTA7Cnh4Kys7Cg==
//// [IdentifierNameWithEscape1.js.map]
{"version":3,"file":"IdentifierNameWithEscape1.js","sourceRoot":"","sources":["IdentifierNameWithEscape1.ts"],"names":[],"mappings":";;;AAAA;IACI,MAAM,CAAS;IAEf,cAAc;QACV,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAAA,CACnB;IAED,OAAO,GAAG;QACN,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IAAA,CACf;CACJ"}
diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map.diff
index 65704c2b34..0121cfc82c 100644
--- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map.diff
+++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).js.map.diff
@@ -4,26 +4,26 @@
//// [identifierVariableWithEscape1.js.map]
-{"version":3,"file":"identifierVariableWithEscape1.js","sourceRoot":"","sources":["identifierVariableWithEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,MAAM,GAAG,EAAE,CAAC;AACvB,SAAC,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMuXHUwMDc4ID0gMTA7DQpleHBvcnRzLngrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFc2NhcGUxLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLE1BQU0sR0FBRyxFQUFFLENBQUM7QUFDdkIsU0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCBcdTAwNzggPSAxMDsKeCsrOwo=
-+{"version":3,"file":"identifierVariableWithEscape1.js","sourceRoot":"","sources":["identifierVariableWithEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,CAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
-+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMueCA9IDEwOw0KZXhwb3J0cy54Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLENBQU0sR0FBRyxFQUFFLENBQUM7QUFDdkIsUUFBQSxDQUFDLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCBcdTAwNzggPSAxMDsKeCsrOwo=
++{"version":3,"file":"identifierVariableWithEscape1.js","sourceRoot":"","sources":["identifierVariableWithEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,MAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMuXHUwMDc4ID0gMTA7DQpleHBvcnRzLngrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFc2NhcGUxLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLE1BQU0sR0FBRyxFQUFFLENBQUM7QUFDdkIsUUFBQSxDQUFDLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCBcdTAwNzggPSAxMDsKeCsrOwo=
//// [identifierVariableWithEscape2.js.map]
-{"version":3,"file":"identifierVariableWithEscape2.js","sourceRoot":"","sources":["identifierVariableWithEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,OAAO,GAAG,EAAE,CAAC;AACxB,UAAE,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnhcdTAwNzggPSAxMDsNCmV4cG9ydHMueHgrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFc2NhcGUyLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLE9BQU8sR0FBRyxFQUFFLENBQUM7QUFDeEIsVUFBRSxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCB4XHUwMDc4ID0gMTA7Cnh4Kys7Cg==
-+{"version":3,"file":"identifierVariableWithEscape2.js","sourceRoot":"","sources":["identifierVariableWithEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,EAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
-+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnh4ID0gMTA7DQpleHBvcnRzLnh4Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi5qcy5tYXA=,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLEVBQU8sR0FBRyxFQUFFLENBQUM7QUFDeEIsUUFBQSxFQUFFLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCB4XHUwMDc4ID0gMTA7Cnh4Kys7Cg==
++{"version":3,"file":"identifierVariableWithEscape2.js","sourceRoot":"","sources":["identifierVariableWithEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,OAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnhcdTAwNzggPSAxMDsNCmV4cG9ydHMueHgrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFc2NhcGUyLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEVzY2FwZTIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpZGVudGlmaWVyVmFyaWFibGVXaXRoRXNjYXBlMi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBVyxRQUFBLE9BQU8sR0FBRyxFQUFFLENBQUM7QUFDeEIsUUFBQSxFQUFFLEVBQUUsQ0FBQyJ9,ZXhwb3J0IGxldCB4XHUwMDc4ID0gMTA7Cnh4Kys7Cg==
//// [identifierVariableWithExtendedEscape1.js.map]
-{"version":3,"file":"identifierVariableWithExtendedEscape1.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,MAAM,GAAG,EAAE,CAAC;AACvB,SAAC,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMuXHV7Nzh9ID0gMTA7DQpleHBvcnRzLngrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxNQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ3ZCLFNBQUMsRUFBRSxDQUFDIn0=,ZXhwb3J0IGxldCBcdXs3OH0gPSAxMDsKeCsrOwo=
-+{"version":3,"file":"identifierVariableWithExtendedEscape1.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,CAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
-+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMueCA9IDEwOw0KZXhwb3J0cy54Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXh0ZW5kZWRFc2NhcGUxLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxDQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ3ZCLFFBQUEsQ0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCBcdXs3OH0gPSAxMDsKeCsrOwo=
++{"version":3,"file":"identifierVariableWithExtendedEscape1.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape1.ts"],"names":[],"mappings":";;;AAAW,QAAA,MAAM,GAAG,EAAE,CAAC;AACvB,QAAA,CAAC,EAAE,CAAC"}
++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueCA9IHZvaWQgMDsNCmV4cG9ydHMuXHV7Nzh9ID0gMTA7DQpleHBvcnRzLngrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxNQUFNLEdBQUcsRUFBRSxDQUFDO0FBQ3ZCLFFBQUEsQ0FBQyxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCBcdXs3OH0gPSAxMDsKeCsrOwo=
//// [identifierVariableWithExtendedEscape2.js.map]
-{"version":3,"file":"identifierVariableWithExtendedEscape2.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,OAAO,GAAG,EAAE,CAAC;AACxB,UAAE,EAAE,CAAC"}
-//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnhcdXs3OH0gPSAxMDsNCmV4cG9ydHMueHgrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxPQUFPLEdBQUcsRUFBRSxDQUFDO0FBQ3hCLFVBQUUsRUFBRSxDQUFDIn0=,ZXhwb3J0IGxldCB4XHV7Nzh9ID0gMTA7Cnh4Kys7Cg==
-+{"version":3,"file":"identifierVariableWithExtendedEscape2.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,EAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
-+//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnh4ID0gMTA7DQpleHBvcnRzLnh4Kys7DQovLyMgc291cmNlTWFwcGluZ1VSTD1pZGVudGlmaWVyVmFyaWFibGVXaXRoRXh0ZW5kZWRFc2NhcGUyLmpzLm1hcA==,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxFQUFPLEdBQUcsRUFBRSxDQUFDO0FBQ3hCLFFBQUEsRUFBRSxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCB4XHV7Nzh9ID0gMTA7Cnh4Kys7Cg==
++{"version":3,"file":"identifierVariableWithExtendedEscape2.js","sourceRoot":"","sources":["identifierVariableWithExtendedEscape2.ts"],"names":[],"mappings":";;;AAAW,QAAA,OAAO,GAAG,EAAE,CAAC;AACxB,QAAA,EAAE,EAAE,CAAC"}
++//// https://sokra.github.io/source-map-visualization#base64,InVzZSBzdHJpY3QiOw0KT2JqZWN0LmRlZmluZVByb3BlcnR5KGV4cG9ydHMsICJfX2VzTW9kdWxlIiwgeyB2YWx1ZTogdHJ1ZSB9KTsNCmV4cG9ydHMueHggPSB2b2lkIDA7DQpleHBvcnRzLnhcdXs3OH0gPSAxMDsNCmV4cG9ydHMueHgrKzsNCi8vIyBzb3VyY2VNYXBwaW5nVVJMPWlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIuanMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaWRlbnRpZmllclZhcmlhYmxlV2l0aEV4dGVuZGVkRXNjYXBlMi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImlkZW50aWZpZXJWYXJpYWJsZVdpdGhFeHRlbmRlZEVzY2FwZTIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQVcsUUFBQSxPQUFPLEdBQUcsRUFBRSxDQUFDO0FBQ3hCLFFBQUEsRUFBRSxFQUFFLENBQUMifQ==,ZXhwb3J0IGxldCB4XHV7Nzh9ID0gMTA7Cnh4Kys7Cg==
//// [IdentifierNameWithEscape1.js.map]
-{"version":3,"file":"IdentifierNameWithEscape1.js","sourceRoot":"","sources":["IdentifierNameWithEscape1.ts"],"names":[],"mappings":";;;AAAA,MAAa,yBAAyB;IAGlC;QACI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;IAChB,CAAC;CACJ;AAVD,8DAUC"}
diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt
index 8f187ec2b9..958cef0999 100644
--- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt
+++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt
@@ -11,25 +11,25 @@ sourceFile:identifierVariableWithEscape1.ts
>>>"use strict";
>>>Object.defineProperty(exports, "__esModule", { value: true });
>>>exports.x = void 0;
->>>exports.x = 10;
+>>>exports.\u0078 = 10;
1 >
2 >^^^^^^^^
-3 > ^
-4 > ^^^
-5 > ^^
-6 > ^
+3 > ^^^^^^
+4 > ^^^
+5 > ^^
+6 > ^
1 >export let
2 >
3 > \u0078
-4 > =
-5 > 10
-6 > ;
+4 > =
+5 > 10
+6 > ;
1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
-3 >Emitted(4, 10) Source(1, 18) + SourceIndex(0)
-4 >Emitted(4, 13) Source(1, 21) + SourceIndex(0)
-5 >Emitted(4, 15) Source(1, 23) + SourceIndex(0)
-6 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
+3 >Emitted(4, 15) Source(1, 18) + SourceIndex(0)
+4 >Emitted(4, 18) Source(1, 21) + SourceIndex(0)
+5 >Emitted(4, 20) Source(1, 23) + SourceIndex(0)
+6 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
---
>>>exports.x++;
1 >
@@ -63,25 +63,25 @@ sourceFile:identifierVariableWithEscape2.ts
>>>"use strict";
>>>Object.defineProperty(exports, "__esModule", { value: true });
>>>exports.xx = void 0;
->>>exports.xx = 10;
+>>>exports.x\u0078 = 10;
1 >
2 >^^^^^^^^
-3 > ^^
-4 > ^^^
-5 > ^^
-6 > ^
+3 > ^^^^^^^
+4 > ^^^
+5 > ^^
+6 > ^
1 >export let
2 >
3 > x\u0078
-4 > =
-5 > 10
-6 > ;
+4 > =
+5 > 10
+6 > ;
1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
-3 >Emitted(4, 11) Source(1, 19) + SourceIndex(0)
-4 >Emitted(4, 14) Source(1, 22) + SourceIndex(0)
-5 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
-6 >Emitted(4, 17) Source(1, 25) + SourceIndex(0)
+3 >Emitted(4, 16) Source(1, 19) + SourceIndex(0)
+4 >Emitted(4, 19) Source(1, 22) + SourceIndex(0)
+5 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
+6 >Emitted(4, 22) Source(1, 25) + SourceIndex(0)
---
>>>exports.xx++;
1 >
@@ -115,25 +115,25 @@ sourceFile:identifierVariableWithExtendedEscape1.ts
>>>"use strict";
>>>Object.defineProperty(exports, "__esModule", { value: true });
>>>exports.x = void 0;
->>>exports.x = 10;
+>>>exports.\u{78} = 10;
1 >
2 >^^^^^^^^
-3 > ^
-4 > ^^^
-5 > ^^
-6 > ^
+3 > ^^^^^^
+4 > ^^^
+5 > ^^
+6 > ^
1 >export let
2 >
3 > \u{78}
-4 > =
-5 > 10
-6 > ;
+4 > =
+5 > 10
+6 > ;
1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
-3 >Emitted(4, 10) Source(1, 18) + SourceIndex(0)
-4 >Emitted(4, 13) Source(1, 21) + SourceIndex(0)
-5 >Emitted(4, 15) Source(1, 23) + SourceIndex(0)
-6 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
+3 >Emitted(4, 15) Source(1, 18) + SourceIndex(0)
+4 >Emitted(4, 18) Source(1, 21) + SourceIndex(0)
+5 >Emitted(4, 20) Source(1, 23) + SourceIndex(0)
+6 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
---
>>>exports.x++;
1 >
@@ -167,25 +167,25 @@ sourceFile:identifierVariableWithExtendedEscape2.ts
>>>"use strict";
>>>Object.defineProperty(exports, "__esModule", { value: true });
>>>exports.xx = void 0;
->>>exports.xx = 10;
+>>>exports.x\u{78} = 10;
1 >
2 >^^^^^^^^
-3 > ^^
-4 > ^^^
-5 > ^^
-6 > ^
+3 > ^^^^^^^
+4 > ^^^
+5 > ^^
+6 > ^
1 >export let
2 >
3 > x\u{78}
-4 > =
-5 > 10
-6 > ;
+4 > =
+5 > 10
+6 > ;
1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
-3 >Emitted(4, 11) Source(1, 19) + SourceIndex(0)
-4 >Emitted(4, 14) Source(1, 22) + SourceIndex(0)
-5 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
-6 >Emitted(4, 17) Source(1, 25) + SourceIndex(0)
+3 >Emitted(4, 16) Source(1, 19) + SourceIndex(0)
+4 >Emitted(4, 19) Source(1, 22) + SourceIndex(0)
+5 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
+6 >Emitted(4, 22) Source(1, 25) + SourceIndex(0)
---
>>>exports.xx++;
1 >
diff --git a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt.diff b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt.diff
index 5e2fc59175..87d1e60bb5 100644
--- a/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt.diff
+++ b/testdata/baselines/reference/submodule/compiler/unicodeEscapesInNames01(target=es5).sourcemap.txt.diff
@@ -1,40 +1,6 @@
--- old.unicodeEscapesInNames01(target=es5).sourcemap.txt
+++ new.unicodeEscapesInNames01(target=es5).sourcemap.txt
-@@= skipped -10, +10 lines =@@
- >>>"use strict";
- >>>Object.defineProperty(exports, "__esModule", { value: true });
- >>>exports.x = void 0;
-->>>exports.\u0078 = 10;
-+>>>exports.x = 10;
- 1 >
- 2 >^^^^^^^^
--3 > ^^^^^^
--4 > ^^^
--5 > ^^
--6 > ^
-+3 > ^
-+4 > ^^^
-+5 > ^^
-+6 > ^
- 1 >export let
- 2 >
- 3 > \u0078
--4 > =
--5 > 10
--6 > ;
-+4 > =
-+5 > 10
-+6 > ;
- 1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
- 2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
--3 >Emitted(4, 15) Source(1, 18) + SourceIndex(0)
--4 >Emitted(4, 18) Source(1, 21) + SourceIndex(0)
--5 >Emitted(4, 20) Source(1, 23) + SourceIndex(0)
--6 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
-+3 >Emitted(4, 10) Source(1, 18) + SourceIndex(0)
-+4 >Emitted(4, 13) Source(1, 21) + SourceIndex(0)
-+5 >Emitted(4, 15) Source(1, 23) + SourceIndex(0)
-+6 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
+@@= skipped -32, +32 lines =@@
---
>>>exports.x++;
1 >
@@ -68,40 +34,6 @@
>>>//# sourceMappingURL=identifierVariableWithEscape1.js.map===================================================================
JsFile: identifierVariableWithEscape2.js
@@= skipped -49, +52 lines =@@
- >>>"use strict";
- >>>Object.defineProperty(exports, "__esModule", { value: true });
- >>>exports.xx = void 0;
-->>>exports.x\u0078 = 10;
-+>>>exports.xx = 10;
- 1 >
- 2 >^^^^^^^^
--3 > ^^^^^^^
--4 > ^^^
--5 > ^^
--6 > ^
-+3 > ^^
-+4 > ^^^
-+5 > ^^
-+6 > ^
- 1 >export let
- 2 >
- 3 > x\u0078
--4 > =
--5 > 10
--6 > ;
-+4 > =
-+5 > 10
-+6 > ;
- 1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
- 2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
--3 >Emitted(4, 16) Source(1, 19) + SourceIndex(0)
--4 >Emitted(4, 19) Source(1, 22) + SourceIndex(0)
--5 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
--6 >Emitted(4, 22) Source(1, 25) + SourceIndex(0)
-+3 >Emitted(4, 11) Source(1, 19) + SourceIndex(0)
-+4 >Emitted(4, 14) Source(1, 22) + SourceIndex(0)
-+5 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
-+6 >Emitted(4, 17) Source(1, 25) + SourceIndex(0)
---
>>>exports.xx++;
1 >
@@ -135,40 +67,6 @@
>>>//# sourceMappingURL=identifierVariableWithEscape2.js.map===================================================================
JsFile: identifierVariableWithExtendedEscape1.js
@@= skipped -49, +52 lines =@@
- >>>"use strict";
- >>>Object.defineProperty(exports, "__esModule", { value: true });
- >>>exports.x = void 0;
-->>>exports.\u{78} = 10;
-+>>>exports.x = 10;
- 1 >
- 2 >^^^^^^^^
--3 > ^^^^^^
--4 > ^^^
--5 > ^^
--6 > ^
-+3 > ^
-+4 > ^^^
-+5 > ^^
-+6 > ^
- 1 >export let
- 2 >
- 3 > \u{78}
--4 > =
--5 > 10
--6 > ;
-+4 > =
-+5 > 10
-+6 > ;
- 1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
- 2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
--3 >Emitted(4, 15) Source(1, 18) + SourceIndex(0)
--4 >Emitted(4, 18) Source(1, 21) + SourceIndex(0)
--5 >Emitted(4, 20) Source(1, 23) + SourceIndex(0)
--6 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
-+3 >Emitted(4, 10) Source(1, 18) + SourceIndex(0)
-+4 >Emitted(4, 13) Source(1, 21) + SourceIndex(0)
-+5 >Emitted(4, 15) Source(1, 23) + SourceIndex(0)
-+6 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
---
>>>exports.x++;
1 >
@@ -202,40 +100,6 @@
>>>//# sourceMappingURL=identifierVariableWithExtendedEscape1.js.map===================================================================
JsFile: identifierVariableWithExtendedEscape2.js
@@= skipped -49, +52 lines =@@
- >>>"use strict";
- >>>Object.defineProperty(exports, "__esModule", { value: true });
- >>>exports.xx = void 0;
-->>>exports.x\u{78} = 10;
-+>>>exports.xx = 10;
- 1 >
- 2 >^^^^^^^^
--3 > ^^^^^^^
--4 > ^^^
--5 > ^^
--6 > ^
-+3 > ^^
-+4 > ^^^
-+5 > ^^
-+6 > ^
- 1 >export let
- 2 >
- 3 > x\u{78}
--4 > =
--5 > 10
--6 > ;
-+4 > =
-+5 > 10
-+6 > ;
- 1 >Emitted(4, 1) Source(1, 12) + SourceIndex(0)
- 2 >Emitted(4, 9) Source(1, 12) + SourceIndex(0)
--3 >Emitted(4, 16) Source(1, 19) + SourceIndex(0)
--4 >Emitted(4, 19) Source(1, 22) + SourceIndex(0)
--5 >Emitted(4, 21) Source(1, 24) + SourceIndex(0)
--6 >Emitted(4, 22) Source(1, 25) + SourceIndex(0)
-+3 >Emitted(4, 11) Source(1, 19) + SourceIndex(0)
-+4 >Emitted(4, 14) Source(1, 22) + SourceIndex(0)
-+5 >Emitted(4, 16) Source(1, 24) + SourceIndex(0)
-+6 >Emitted(4, 17) Source(1, 25) + SourceIndex(0)
---
>>>exports.xx++;
1 >
@@ -268,7 +132,7 @@
---
>>>//# sourceMappingURL=identifierVariableWithExtendedEscape2.js.map===================================================================
JsFile: IdentifierNameWithEscape1.js
-@@= skipped -51, +54 lines =@@
+@@= skipped -29, +32 lines =@@
>>>exports.IdentifierNameWithEscape1 = void 0;
>>>class IdentifierNameWithEscape1 {
1 >
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js
index e5d162710e..4eacdc98ee 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
exports.f = f;
exports.f1 = f;
-exports.v1 = exports.v = 1;
+exports.v = 1;
exports.v1 = exports.v;
function f() { }
class C {
@@ -55,7 +55,7 @@ var E;
var M;
(function (M) {
})(M || (exports.M1 = exports.M = M = {}));
-exports.a1 = exports.a = M.x;
+exports.a = M.x;
exports.a1 = exports.a;
//// [t2.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff
index 08c13641a9..deb208857e 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3-es6.js.diff
@@ -1,22 +1,6 @@
--- old.exportsAndImports3-es6.js
+++ new.exportsAndImports3-es6.js
-@@= skipped -38, +38 lines =@@
- exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
- exports.f = f;
- exports.f1 = f;
--exports.v = 1;
-+exports.v1 = exports.v = 1;
- exports.v1 = exports.v;
- function f() { }
- class C {
-@@= skipped -16, +16 lines =@@
- var M;
- (function (M) {
- })(M || (exports.M1 = exports.M = M = {}));
--exports.a = M.x;
-+exports.a1 = exports.a = M.x;
- exports.a1 = exports.a;
- //// [t2.js]
+@@= skipped -60, +60 lines =@@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = exports.M = exports.E = exports.C = exports.f = exports.v = void 0;
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js
index 164f368be8..ef5aed09c4 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
exports.f = f;
exports.f1 = f;
-exports.v1 = exports.v = 1;
+exports.v = 1;
exports.v1 = exports.v;
function f() { }
class C {
@@ -55,7 +55,7 @@ var E;
var M;
(function (M) {
})(M || (exports.M1 = exports.M = M = {}));
-exports.a1 = exports.a = M.x;
+exports.a = M.x;
exports.a1 = exports.a;
//// [t2.js]
"use strict";
diff --git a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff
index abd2951ede..94f6dcd18d 100644
--- a/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff
+++ b/testdata/baselines/reference/submodule/conformance/exportsAndImports3.js.diff
@@ -1,22 +1,6 @@
--- old.exportsAndImports3.js
+++ new.exportsAndImports3.js
-@@= skipped -38, +38 lines =@@
- exports.a1 = exports.M1 = exports.E1 = exports.C1 = exports.v1 = exports.a = exports.M = exports.E = exports.C = exports.v = void 0;
- exports.f = f;
- exports.f1 = f;
--exports.v = 1;
-+exports.v1 = exports.v = 1;
- exports.v1 = exports.v;
- function f() { }
- class C {
-@@= skipped -16, +16 lines =@@
- var M;
- (function (M) {
- })(M || (exports.M1 = exports.M = M = {}));
--exports.a = M.x;
-+exports.a1 = exports.a = M.x;
- exports.a1 = exports.a;
- //// [t2.js]
+@@= skipped -60, +60 lines =@@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = exports.M = exports.E = exports.C = exports.f = exports.v = void 0;
diff --git a/testdata/tests/cases/compiler/exportDestructuring.ts b/testdata/tests/cases/compiler/exportDestructuring.ts
new file mode 100644
index 0000000000..ec1430462b
--- /dev/null
+++ b/testdata/tests/cases/compiler/exportDestructuring.ts
@@ -0,0 +1,6 @@
+// @target: esnext
+// @module: commonjs
+// @strict: true
+
+const arr = [1, 2];
+export const [a, b] = arr;