We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0409c24 commit 3dd3401Copy full SHA for 3dd3401
1 file changed
src/compiler/transformers/module/module.ts
@@ -717,7 +717,13 @@ namespace ts {
717
const classDecl = original as ClassDeclaration;
718
if (classDecl.name) {
719
const statements = [node];
720
+ // Avoid emitting a default because that will typically be taken care of for us.
721
+ if (hasModifier(classDecl, ModifierFlags.Export) && !hasModifier(classDecl, ModifierFlags.Default)) {
722
+ addExportMemberAssignment(statements, classDecl)
723
+ }
724
+
725
addExportMemberAssignments(statements, classDecl.name);
726
727
if (statements.length > 1) {
728
Debug.assert(!!classDecl.decorators, "Expression statements should only have an export member assignment when decorated.")
729
}
0 commit comments