@@ -2749,7 +2749,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
27492749 * if we should also export the value after its it changed
27502750 * - check if node is a source level declaration to emit it differently,
27512751 * i.e non-exported variable statement 'var x = 1' is hoisted so
2752- * we we emit variable statement 'var' should be dropped.
2752+ * when we emit variable statement 'var' should be dropped.
27532753 */
27542754 function isSourceFileLevelDeclarationInSystemJsModule(node: Node, isExported: boolean): boolean {
27552755 if (!node || !isCurrentFileSystemExternalModule()) {
@@ -5503,16 +5503,15 @@ const _super = (function (geti, seti) {
55035503 write("export ");
55045504 }
55055505
5506- if (!isHoistedDeclarationInSystemModule) {
5507- write("let ");
5508- }
55095506 if (decoratedClassAlias !== undefined) {
5510- write(`${decoratedClassAlias}`);
5507+ write(`let ${decoratedClassAlias}`);
55115508 }
55125509 else {
5510+ if (!isHoistedDeclarationInSystemModule) {
5511+ write("let ");
5512+ }
55135513 emitDeclarationName(node);
55145514 }
5515-
55165515 write(" = ");
55175516 }
55185517 else if (isES6ExportedDeclaration(node)) {
@@ -5530,7 +5529,9 @@ const _super = (function (geti, seti) {
55305529 //
55315530 // We'll emit:
55325531 //
5533- // (_temp = class C { ... }, _temp.a = 1, _temp.b = 2, _temp)
5532+ // let C_1 = class C{};
5533+ // C_1.a = 1;
5534+ // C_1.b = 2; // so forth and so on
55345535 //
55355536 // This keeps the expression as an expression, while ensuring that the static parts
55365537 // of it have been initialized by the time it is used.
0 commit comments