Skip to content

Commit 9cd96e6

Browse files
committed
[Transforms] Accept .js baselines when there are compiler's errors (microsoft#8744)
* Accept .js baselines as these are baselines when there are compiling errors * Remove unnecessary setting of flag because this operation is handled in getReferencedExportContainer function in checker
1 parent 9bae57e commit 9cd96e6

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/compiler/transformers/module/module.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,6 @@ namespace ts {
698698
function visitClassDeclaration(node: ClassDeclaration): VisitResult<Statement> {
699699
const statements: Statement[] = [];
700700
const name = node.name || getGeneratedNameForNode(node);
701-
// Set emitFlags on the name of the classDeclaration
702-
// This is so that when printer will not substitute the identifier
703-
setNodeEmitFlags(name, NodeEmitFlags.NoSubstitution);
704701
if (hasModifier(node, ModifierFlags.Export)) {
705702
statements.push(
706703
setOriginalNode(

tests/baselines/reference/defaultExportsCannotMerge02.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var Decl = (function () {
3333
return Decl;
3434
}());
3535
Object.defineProperty(exports, "__esModule", { value: true });
36-
exports.default = Decl;
36+
exports.default = exports.Decl;
3737
//// [m2.js]
3838
"use strict";
3939
var m1_1 = require("m1");

tests/baselines/reference/defaultExportsCannotMerge04.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export interface Foo {
1818
function Foo() {
1919
}
2020
Object.defineProperty(exports, "__esModule", { value: true });
21-
exports.default = Foo;
21+
exports.default = exports.Foo;
2222
var Foo;
2323
(function (Foo) {
24-
})(Foo || (Foo = {}));
24+
})(exports.Foo || (exports.Foo = {}));

0 commit comments

Comments
 (0)