diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 14134a0e206..d6de01342be 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -717,7 +717,13 @@ namespace ts { const classDecl = original as ClassDeclaration; if (classDecl.name) { const statements = [node]; + // Avoid emitting a default because that will typically be taken care of for us. + if (hasModifier(classDecl, ModifierFlags.Export) && !hasModifier(classDecl, ModifierFlags.Default)) { + addExportMemberAssignment(statements, classDecl) + } + addExportMemberAssignments(statements, classDecl.name); + if (statements.length > 1) { Debug.assert(!!classDecl.decorators, "Expression statements should only have an export member assignment when decorated.") }