mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Correct export assignments for when the variable declaration has an export modifier.
This commit is contained in:
parent
0409c242af
commit
3dd340179c
@ -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.")
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user